-1
i want to pick up a string and remove the white spaces contained in it.nome = algumacoisa
imagine that this is a string, I want to remove the blank spaces between the "name" and the "=" and the "=" and the "somemacoisa"
-1
i want to pick up a string and remove the white spaces contained in it.nome = algumacoisa
imagine that this is a string, I want to remove the blank spaces between the "name" and the "=" and the "=" and the "somemacoisa"
1
Use gsub
. Thus s=s:gsub("%s+","")
.
The pattern %s+
means "one or more space characters (whitespace)".
Browser other questions tagged string lua
You are not signed in. Login or sign up in order to post.