Alpha Documentation



Example 1 - simple


string = "ten,nine,seven,six"

string = strtran(string,",","|")


?string

= "ten|nine|seven|six"


Example 2 - variations


string = "ten,nine,seven,six"

string = strtran(string,",","|",1,1)

?string

= "ten|nine,seven,six"


string = "ten,nine,seven,six"

string = strtran(string,",","|",2)

?string

= "ten,nine|seven|six"


Example 3 - mail merge


first_name = "Steve" ' from database, etc.

last_name = "Wood"


....


e_msg  = cn.resultset.data("Body_html") 'pulled from database table, etc


....


e_msg = stritran(e_msg,"***firstname***",alltrim(first_name))

e_msg = stritran(e_msg,"***lastname***",alltrim(last_name))

....



where e_msg originally contains:


Dear ***firstname*** ***lastname***,


Thank you for...


Result in e_msg is:


Dear Steve Wood,


Thank you for...