[Gambas-user] Split: misleading Wiki

Matti matti.eber at ...3240...
Mon May 22 22:03:27 CEST 2017


If I have a string sStr="hello##12345" and want to split it:

Dim aSplit as String[]
aSplit = Split(sStr, "##")
Print aSplit[0], aSplit[1]

Returns always only "hello". Maybe "12345" is excluded because being an integer?

Now the Wiki says "StringArray = Split ( String [ , Separators , Escape , IgnoreVoid , KeepEscape ] )"
Where "IgnoreVoid" means "a boolean that tells Split() *not* to return void elements."

By trial and error I found out that "IgnoreVoid" has to be set to 'True' to return "12345". Exactly the opposite.

The Wiki should be corrected here.

Matti



More information about the User mailing list