[Gambas-user] Split Function ???

Benoît Minisini g4mba5 at gmail.com
Tue Jan 12 14:22:21 CET 2021


Le 12/01/2021 à 14:03, Olivier Coquet a écrit :
> Hi all,
> 
> I have a problem with Split function.
> 
> If I have a string like this:
> 
> *"Test - test2 - test3 test4"*
> 
> and I split with *" - "* separation string, I obtain
> 
> *"Test" "test2" "test3" "test4"*
> 
> and I want:
> 
> *"Test" "test2" "test3 test4"*
> 
> How can I make this ?
> 
> 
> regards
> 
> Olivier
> 
> 
> 
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
> 

Read the documentation : Split() only splits with one character 
separators. The separator string " - " actually means " " or "-".

To split with any string separator, you have to write your own function.

Regards,

-- 
Benoît Minisini


More information about the User mailing list