Replace characters in a string
String_Type strtrans (str, old_set, new_set)
String_Type str, old_set, new_set;
The strtrans function may be used to replace all the characters
from the set old_set with the corresponding characters from
new_set in the string str. If new_set is empty,
then the characters in old_set will be removed from str.
This function returns the result.
str = strtrans (str, "A-Z", "a-z"); % lower-case str
str = strtrans (str, "^0-9", " "); % Replace anything but 0-9 by space
- slangrtl
-
define_case,
is_substr,
str_replace,
strcmp,
strcompress,
strlow,
strreplace,
strsub,
strtrim,
strtrim_beg,
strtrim_end,
strup,
tolower,
toupper
|