|
Proof: Suppose the string is N bytes long. Then it cannot contain the substring '['..string.rep('-',N-1)..']'. That string delimiter is therefore adequate for embedding the string. Q.E.D.oops ... ']' should be '['.
And I guess '-' should be '='? I still don't see how this is relevant given the topic though: How do long strings help with embedding literal UTF-8 sequences, given that the Lua 5.1 reference manual seems to make no guarantees about whether the lexer and parser preserve literal UTF-8 sequences in string literals?
- Peter Odding