Jump to content
  • 0

how to do it on the left?


XkPP

Question

2 answers to this question

Recommended Posts

Direct answer to the question is present in Lua reference manual: 

Quote

string.sub (s, i [, j])

Returns the substring of s that starts at i and continues until j; i and j can be negative. If j is absent, then it is assumed to be equal to -1 (which is the same as the string length). In particular, the call string.sub(s,1,j) returns a prefix of s with length j, and string.sub(s, -i) (for a positive i) returns a suffix of s with length i.

https://www.lua.org/manual/5.3/manual.html#pdf-string.sub

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.