replace

HC Data Structure Primitives Constructors replace
genSym StringBuffer

replace aword withaword inathing


outputs a new word with the first occurence of aword inathing replaced withaword.

Examples:

show replace "a "e "hallo		;"hello
show replace "abba "elle "jabbai		;"jellei
show replace "a "b [aaa]		;"abb
show replace "b "x {a b c}		;{a x c}

References:

genSym StringBuffer