You find this example project in your Plugins Download as a Xojo project file within the examples folder: /DataTypes/Split Test
Class App Inherits Application
Const kEditClear = "&Delete"
Const kFileQuit = "&Quit"
Const kFileQuitShortcut = ""
End Class
Class Window1 Inherits Window
Control Listbox1 Inherits Listbox
ControlInstance Listbox1 Inherits Listbox
End Control
EventHandler Sub Open()
// Split in 64-bit is broken in Xojo 2016r3 and older.
dim t as string = "Hello Grüße äöü Gruß test"
dim c() as string = SplitMBS(t, " ")
dim d() as string = Split(t, " ")
for i as integer = 0 to c.Ubound
dim cc as string = c(i)
dim dd as string
if i <= d.Ubound then
dd = d(i)
end if
Listbox1.AddRow str(i), str(len(cc)), str(lenb(cc)), cc, str(len(dd)), str(lenb(dd)), dd
next
t = ConvertEncoding(t, encodings.WindowsANSI)
c = SplitMBS(t, " ")
d = Split(t, " ")
for i as integer = 0 to c.Ubound
dim cc as string = c(i)
dim dd as string
if i <= d.Ubound then
dd = d(i)
end if
Listbox1.AddRow str(i), str(len(cc)), str(lenb(cc)), cc, str(len(dd)), str(lenb(dd)), dd
next
End EventHandler
End Class
MenuBar MainMenuBar
MenuItem FileMenu = "&File"
MenuItem FileQuit = "#App.kFileQuit"
MenuItem EditMenu = "&Edit"
MenuItem EditUndo = "&Undo"
MenuItem EditSeparator1 = "-"
MenuItem EditCut = "Cu&t"
MenuItem EditCopy = "&Copy"
MenuItem EditPaste = "&Paste"
MenuItem EditClear = "#App.kEditClear"
MenuItem EditSeparator2 = "-"
MenuItem EditSelectAll = "Select &All"
End MenuBar