Log In  

Is there no way to get a substring with pico? x:sub, which is standard in 5.1, results in an error. So does string.sub, and so does x:gsub.

Relevant: http://stackoverflow.com/questions/829063/how-to-iterate-individual-characters-in-lua-string

P#16583 2015-11-12 15:29 ( Edited 2015-11-12 21:00)

You can grab substrings with sub(str, start, end)

Note that pico-8 doesn't actually include the standard library, except for pairs()

P#16584 2015-11-12 15:44 ( Edited 2015-11-12 20:45)

Oh - that explains it. Thanks!

P#16585 2015-11-12 16:00 ( Edited 2015-11-12 21:00)

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-04-16 18:41:33 | 0.006s | Q:10