|
subst, substall
| Format:
subst ( string, pattern, replacement ) |
| Format:
substall ( string, pattern, replacement ) |
Purpose:
Substitutes sub-strings of a string by other strings.
All three arguments must be strings.
subst() replaces the first occurrence of the characters
specified by the pattern
parameter in string
by the replacement parameter.
The substall() function works
the same, except that it replaces all occurrences of the
pattern.
Return Values:
Returns the string with the replacements.
Example 1:
heitml input:
<let a="Take the ball and run with it!";
b="e ball and run with";
c="is job and shove";
d=subst(a,b,c);
? d
>
| resulting output:
Take this job and shove it!
|
Example 2:
heitml input:
<let a="v w x y z"; b=" "; c=",";
d=substall(a,b,c);
? d
>
| resulting output:
v,w,x,y,z
|
See Also:
index(), substring().
This page was dynamically generated by
heitml
© 1996-2009 H.E.I. All Rights Reserved
|