Jump to content

[HELP] String converting


ozulus

Recommended Posts

  • Moderators

I am not pro in strings, but this is what I can do.

local testString  = "Furkan Ozulus" 
local stringLength = string.len(testString ) 
local newString = "" 
  
for i=1,stringLength do 
    if math.random(2) == 1 then 
        newString = newString .. string.sub(testString,i,i) 
    else 
        newString = newString .. "_" 
    end 
    if i ~= stringLength then 
        newString = newString .. " " 
    end 
end 
  
outputChatBox(newString) 

Link to comment

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...