Jump to content

remove last letter?


SirniNamaz

Recommended Posts

Guest Guest4401
Posted
local text = "abcde" 
  
print ( text:sub(1,#text-1) ) -- "abcd" 

Posted
local text = "abcde" 
  
print ( text:sub(1,#text-1) ) -- "abcd" 

Or

local text = "abcde" 
  
print ( text:sub(1,-2) ) -- "abcd" 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...