I've tried looking through the Lua documentation for equivelents of VBScript's Left() and Right(), but I can't seem to find them.
Is string.gsub() all I have to work with?
Is string.gsub() all I have to work with?
This forum is a read-only archive of the Gammon Software forum (2000–2026). No new posts can be made. Search the archive.
Posted by Gore on Mon 29 Jan 2007 05:15 PM — 2 posts, 18,068 views.
string.sub. It does both of them at once.string.sub(s, 1, 5) gets the first 5 characters.string.sub(s, -5) gets the last 5 characters.