WoW:API format: Difference between revisions

46 bytes removed ,  10 July 2010
removed opinion text
({{luaapi}})
(removed opinion text)
Line 3: Line 3:
  format(formatstring, e1, e2, ...)
  format(formatstring, e1, e2, ...)


Create a formatted string from the format and arguments provided. This is similar to the printf("format",...) function in C. An additional option %q returns string in a format that can safely be read back by Lua interpreter (puts quotes around a string and escapes special characters), it has little or no use in addon programming, but used by World of Warcraft to preparse all strings before saving them between sessions.
Create a formatted string from the format and arguments provided. This is similar to the printf("format",...) function in C. An additional option %q returns string in a format that can safely be read back by Lua interpreter (puts quotes around a string and escapes special characters), but used by World of Warcraft to preparse all strings before saving them between sessions.


* c, d, E, e, f, g, G, i, o, u, X, and x all expect a number as argument.
* c, d, E, e, f, g, G, i, o, u, X, and x all expect a number as argument.
Anonymous user