Documentation

subchar

Syntax: %subchar(string,oldlist,newlist)

Replaces characters of string contained in oldlist with the corresponding character in newlist and return the result.

Examples:

#SHOW %subchar("hello world","hl","12")
displays "1e22o wor2d" where all "h" characters are replaced with "1" and all "l" characters are replaced with "2"

#SHOW %subchar("hello world","hl","")


displays "eo word" where all "h" and "l" characters are removed (replaced with nothing).

Add comment

Login or register to post comments