Where is the documentation about :upper, :sub, :gsub, :replace, and so on?
And what is it called/terminology?
From what I know this is from Lua itself and not something defined in the FrameXML, since they also work in the live demo.
I see it used everywhere a bit, but nothing about where it actually comes from.
I'll expand on this a bit. Say you write the expression on the left:
The first thing Lua does (conceptually anyhow, the engine itself is smarter than all these steps I'm writing here) is to replace the "colon/method call" sugar with normal field access:
Next it replaces the "field access" sugar with actual key lookup:
Now it tries to index 's' to find a key "byte"... except it can't, because strings don't have keys. If 's' were a table, it would actually look inside it, but since it's a string Lua skips the nonsensical lookup. The following steps are the same though.
Next it checks whether 's' has a metatable. (If the standard string library is loaded, then all strings are set to use the same metatable.)
Next it checks whether the metatable has an __index key. It does.
Next it checks whether __index refers to a function or to a table. In this case, it's a table, so the key lookup is repeated in that table. For strings, __index is set to point to the table called 'string' that contains all the library functions. So the final form is
And again, that's more of a mental walkthrough, the Lua engine isn't doing all these teensy steps each time somebody writes str:lower().
Besides, the reference manual is hard to read for noobs ><
It's definitely meant as a dry reference, not a friendly tutorial. If you have some spare change to drop, I highly recommend buying the 2nd edition of Programming in Lua. It's only available in print, not online, but the additional material and rewritten sections are a big improvement over the free online first edition.