18 posts
Posted 07 June 2015 - 10:03 PM
I'm trying to see if a string is equal to "\"; but that is obviously trying to run a string command like \n and thinks that the string is unfinished. Is there a way to prevent that from happening?
227 posts
Location
Germany
Posted 07 June 2015 - 10:14 PM
You're probably searching for something like this:
if yourString == "\\" then
--# Do stuff
end
A single backslash would indicate that the " is escaped. This way you would escape the backslash and check if the string is equal to the latter.
Edited on 07 June 2015 - 08:14 PM
18 posts
Posted 07 June 2015 - 10:15 PM
That's exactly what I was searching for.