API strtrim

104,672pages on
this wiki
Add New Page
Talk0 Share
WoW API < strtrim

Trim characters (chars), off the left and right of str

local newstr = strtrim(str[, chars])

Arguments Edit

(str[, chars])
String - The input string.
String - A list of characters to remove from the left and right of str.
If left off, it defaults to " \t\r\n" ([space][tab][return][newline]).
If adding this argument, please note that spaces will not be trimmed unless you include one with the other characters ("123" is not the same as " 123").

Returns Edit

String - The modified string.

Example Edit

str = "///All debug and no play, make Eric go crazy.\n\n"
a = strtrim(str, "/\n");


All debug and no play, make Eric go crazy.

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

Also on Fandom

Random Wiki