Sample code for 30+ languages & platforms
Lianja

StringBuilder RemoveAfterFinal

Demonstrates the StringBuilder.RemoveAfterFinal method.

The GetBefore method was added in Chilkat v9.5.0.77

Chilkat Lianja Downloads

Lianja
llSuccess = .F.

loSb = createobject("CkStringBuilder")
llSuccess = loSb.Append("abc::def::ghi")

// Replace the 1st occurrence of a substring with another string.
llBFound = loSb.ReplaceFirst("::","-")

? "bFound = " + str(llBFound)
? "sb contains: " + loSb.GetAsString()

// Output is:
// bFound = True
// sb contains: abc-def::gh


release loSb