$replace()
DESCRIPTION
in a string, replace characters beginning at a specified index position
with another string
SYNOPSIS
$replace(s1,s2,i1,i2)
ARGUMENTS
s1 - a quoted string, or string expression
s2 - a quoted string, or string expression
i1 - a positive integer, or integer expression, greater than or equal to one
i2 - a positive integer, or integer expression, greater than or equal to zero
EXAMPLES
# pikt +C 'output $replace("all hell broke loose","ck",7,2)'
all heck broke loose
# pikt +C 'output $replace("what is the meaning of this?","",9,15)'
what is this?
# pikt +C 'output $replace("your chances are slim to none","second",18,4)'
your chances are second to none
# pikt +C 'output $replace("your chances are slim to none","second",6,6)'
your seconds are slim to none
# pikt +C 'output $replace("your chances are slim to none","second",1,21)'
second to none
SEE ALSO
$substitute()
String Functions
Numerical Functions