vl-string-translate (AutoLISP)

Replaces characters in a string with a specified set of characters

Supported Platforms: Windows and Mac OS

Signature

(vl-string-translate source-set dest-set str)
source-set

Type: String

Characters to be matched.

dest-set

Type: String

Characters to be substituted for those in source-set.

str

Type: String

The textual value to be searched and translated.

Return Values

Type: String

The value of str after any substitutions have been made

Examples

(vl-string-translate "abcABC" "123123" "A is a, B is b, C is C")
"1 is 1, 2 is 2, 3 is 3"

(vl-string-translate "abc" "123" "A is a, B is b, C is C")
"A is 1, B is 2, C is 3"