Xbase++
Xbase++
Load StringTable from a StringBuilder
Demonstrates how to load a StringTable from the text contained in a Chilkat StringBuilder object.Chilkat Xbase++ Downloads
LOCAL nSuccess
LOCAL oStrTab
LOCAL oSb
LOCAL i
LOCAL nNumStrings
nSuccess := 0
oStrTab := CreateObject("Chilkat.StringTable")
oSb := CreateObject("Chilkat.StringBuilder")
oSb:Append("This is line 1" + Chr(13) + Chr(10))
oSb:Append("An empty line follows..." + Chr(13) + Chr(10))
oSb:Append(Chr(13) + Chr(10))
oSb:Append("This is line 4" + Chr(13) + Chr(10))
oStrTab:AppendFromSb(oSb)
i := 0
nNumStrings := oStrTab:Count
DO WHILE i < nNumStrings
? Str(i) + ": " + oStrTab:StringAt(i)
i := i + 1
ENDDO
oStrTab:destroy()
oSb:destroy()