How to insert tabs into a string?

It appears that _G.string.format doesn’t support inserting tabs into a string using the ‘\t’ escape character. However, most lua docs claim that string.format is “just like printf” in C/C++. Here’s a quote from the Lua Reference Manual:

The format string follows the same rules as the printf family of standard C functions. The only differences are that the options/modifiers * , l , L , n , p , and h are not supported

So far, I’ve found this not to be true for ‘\t’. Now, I fullly acknowledge that I’ve probably missed something somewhere, so would some kind soul tell me how to insert a tab character into a string using Blizzard’s version of Lua?

Thanks,

It looks like it’s working for me.
string.byte('\t') is 9 which is the right code for tab.

You don’t need string.format for the backslash escape sequences btw. They’re handled before the string gets to the function.

The UI might not display tabs. /print('\t') shows a rectangle like the font has no glyph for that character.

Thanks for the reply, Sharinthia. Indeed, I am attempting to print using the NNN.Text:Insert() method. And the little square is exactly what I see. So, it looks like I’ll just have to live without tabs.

Again, thanks,