[Gambas-user] Issue 75 in gambas: Split function problem
gambas at ...2524...
gambas at ...2524...
Wed Aug 3 20:51:25 CEST 2011
Status: New
Owner: ----
Labels: Version Type-Bug Priority-Medium OpSys-Any Dist-Any Arch-Any
Desktop-Any GUI-Any
New issue 75 by fabio.st... at ...626...: Split function problem
http://code.google.com/p/gambas/issues/detail?id=75
Split function problem
Version: 2.21
Revision:
Operating system: Linux
Distribution: Ubuntu 11.05
Architecture: x86
GUI component: QT4
Desktop used: Gnome
If I use Split on "1 2 3 4 5"
DIM s AS String
DIM sa AS String[]
DIM i AS Integer
s = "1 2 3 4 5"
sa = NEW String[]
sa = Split(s, " ")
FOR i = 0 TO sa.length - 1
PRINT i, sa[i]
NEXT
the output is:
0 1
1 2
2 3
3 4
4 5
If I use Split on " 1 2 3 4 5"
DIM s AS String
DIM sa AS String[]
DIM i AS Integer
s = " 1 2 3 4 5"
sa = NEW String[]
sa = Split(s, " ")
FOR i = 0 TO sa.length - 1
PRINT i, sa[i]
NEXT
the output is:
0.......
1 1
2 2
3 3
4 4
5 5
Regards
Fabio Sturman
More information about the User
mailing list