Skip to content
everloot

Lore archive · Warcraft Wiki, 2023 dump

API strtrim

Last wiki revision 2022-07-22

Trim characters (chars), off the left and right of str local newstr = strtrim(str[, chars])

  • (str[, chars])
  • str: - The input string.
  • chars: - 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").
  • newstr: - The modified string.

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

Result All debug and no play, make Eric go crazy.

Source

https://warcraft.wiki.gg/wiki/API_strtrim · retrieved 2023-11-13 · CC BY-SA 4.0

Converted from wikitext with templates, tables and images removed, so some sentences may be missing values.

This archive predates WoW: Forever. For collected gameplay facts see the Forever database. Search the archive.