Sample code for 30+ languages & platforms
Lianja

StringBuilder ReplaceWord

Demonstrates the ReplaceWord method.

Chilkat Lianja Downloads

Lianja
loSb = createobject("CkStringBuilder")
loSb.Append("forest, lumber, lumberjack, jack, timberland")

// The ReplaceWord method replaces word occurances.

// For example:
lnNumReplacements = loSb.ReplaceWord("lumber","timber")
lnNumReplacements = loSb.ReplaceWord("jack","joe")

// The string content is now:
// forest, timber, lumberjack, joe, timberland
? loSb.GetAsString()


release loSb