[Gambas-devel] gb3 Split() problem

Benoît Minisini gambas at ...1...
Mon Jan 4 13:10:35 CET 2010


> 2010/1/4 Benoît Minisini <gambas at ...1...>:
> > Yes, I have added an explicit warning to the Split documentation, as
> > apparently it was not clear enough.
> 
> Ok, I don't have an issue with that because I can deal with it, but
> about this...
> 
> StringArray = Split ( String AS String [ , Separators AS String ,
> Escape AS String , IgnoreVoid AS Boolean , KeepEscape AS Boolean ] )
> 
> I will change "Separators AS String" to "Separator AS String", in
> accordance with what the UI actually says.
> 
> I will also fix this, which uses two characters:
> 
> Elt = Split(" Gambas Almost Means BASIC  !\n'Do you agree ?'", " \n", "'")
> 
> " \n" is wrong.

No, you can have several different separators. Each character in the 
"Separators" is a possible separator. This is the reason why Separator is 
written in the plural.

> 
> I will also simplify the example:
> 
> Elt = Split(" Gambas Almost Means BASIC  !\n'Do you agree ?'", " \n", "'")
> 
> The control characters, question marks. and exclamation marks make it
> extremely difficult to immediately understand that the separator is
> singular.
> 
> Are you ok with that?
> 
> Regards,
> 

You can add simpler examples, but do not remove the complex ones, are AFAIK, 
they are correct.

Regards,

-- 
Benoît Minisini




More information about the Devel mailing list