How would I approach this: Removing spaces from a string

Just gonna need it soon, I haven’t seen any functions for this on the Lua docs for strings, so how would I do this?

I would use string.gsub(Instance, KeyToReplace, Replacement)

local String = "Hello my name is FederalTactical";
print(string.gsub(String, " ", ""))
1 Like

Oh, thanks! I didn’t know what string.gsub() was, so thanks for a demonstration on using it to remove spaces.

1 Like