[Gambas-user] Split a line with double spaces
user
demosthenesk at ...626...
Fri Oct 15 13:26:13 CEST 2010
Hi to all,
i have a string which contains two spaces in a row.
i use split function to split this string in 2 parts with separator the
2 spaces.
sOneLine="/mnt/store/RealViruses/minitest/Trojan-Spy.Win32.Zbot.hzu
Virus found Win32/Heur"
sSplitLine = Split(sOneLine, (" ")
Normally i want to have
sSplitLine[0]="/mnt/store/RealViruses/minitest/Trojan-Spy.Win32.Zbot.hzu"
sSplitLine[1]="Virus found Win32/Heur"
but split uses the 2 spaces as one so i get
sSplitLine[0]="/mnt/store/RealViruses/minitest/Trojan-Spy.Win32.Zbot.hzu"
sSplitLine[1]="Virus"
sSplitLine[2]="found
sSplitLine[3]="Win32/Heur"
What must i do to get
sSplitLine[0]="/mnt/store/RealViruses/minitest/Trojan-Spy.Win32.Zbot.hzu"
sSplitLine[1]="Virus found Win32/Heur"
i have already tried to use some ascii code for space as
sSplitLine = Split(sOneLine, ((Chr(32) & Chr(32))))
but no results
Any help?
More information about the User
mailing list