substitute

String Substitute

Type: function

Returns: string

Description: Replace all the occurances of substring in string with replace string. Two parameter version uses Perl ~s on string where substring begins with ~s.

Usage:
 substitute ( <string> , <substring> [ , <replace string> ] [ , <number of times> ] )

Example 1:

Displayed Text:
red, green, blue

Action Tag:
{% s='red#green#blue' ; substitute(s,'#',', ') }

Example 2:

Displayed Text:
Large - $54.00 and Medium - $51.25.

Action Tag:
{% s='Large - $54.00 and Medium - $51.25.' ; substitute(s,'~s/(\$\d*\.\d*)/<font color=red>$1<\/font>/g') }

 

 

| Home |


November 20, 2003

System resources to generate this page:
1: READ FILE A: /home/action/public_html/_global.shtml (0s)
19: READ FILE A: /home/action/adocs/docs/functions.shtml (0s)
6: READ FILE FAILED: /home/action/public_html/docs/functions.txt (0s)
71: SQL SELECT (FNC): DBI:mysql:action_database:localhost (0s)
75: READ FILE A: /home/action/adocs/docs/inc_docHeader.html (0s)
110: READ FILE A: /home/action/adocs/docs/inc_trailer.html (0s)