3B00DG4MER Posted May 25, 2015 Posted May 25, 2015 Hi guys, I was trying an editfield with dx i had problem how to replace for ex : "3B00DG4MER" with "***********" or "hi" with "**" i tried using string.gsub string.gsub(self.edit.text, "(%a)", function(w) return "*" end) SAF/SAO - 30% Skype: Themerzoug2020 in-game name:3B00DG4MER
WhoAmI Posted May 25, 2015 Posted May 25, 2015 (edited) string.gsub ( self.edit.text, ".", "*" ) Edited May 25, 2015 by Guest
tosfera Posted May 25, 2015 Posted May 25, 2015 use lua's string.rep function to repeat something. can be used like; dxDrawText ( string.rep ( "*", string.length ( self.edit.text ) ), ... This way, you don't have to save the password somewhere else for your authentication ( if it's a password ). If you want to contact me directly concerning Advanced-Gaming, please contact me at [email protected]
3B00DG4MER Posted May 25, 2015 Author Posted May 25, 2015 string.len and not string.length Ty anyway SAF/SAO - 30% Skype: Themerzoug2020 in-game name:3B00DG4MER
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now