Tcl
Tcl
StringBuilder RemoveBefore
Demonstrates the StringBuilder.RemoveBefore method.The GetBefore method was added in Chilkat v9.5.0.77
Chilkat Tcl Downloads
load ./chilkat.dll
set success 0
set sb [new_CkStringBuilder]
set success [CkStringBuilder_Append $sb "http://www.chilkatsoft.com"]
# The RemoveBefore method removes the chars up to and including the marker string.
# If the marker is not found, then nothing is removed and the method returns 0.
set marker "//"
set bFound [CkStringBuilder_RemoveBefore $sb $marker]
puts "bFound = $bFound"
puts "sb contains: [CkStringBuilder_getAsString $sb]"
# Output is:
# bFound = 1
# sb contains: www.chilkatsoft.com
delete_CkStringBuilder $sb