fairyoggy Posted May 21, 2021 Share Posted May 21, 2021 if not utf8.match(edit,"^%u") then -- the first letter not capitalized end How to make a check that all letters are small? I have some code that checks if the first letter is capitalized. But I still don't understand how to use it back. At least some examples are needed. Where can I read more about this? Link to comment
SpecT Posted May 21, 2021 Share Posted May 21, 2021 (edited) Hey, Well you can use string.match and check whether there are any uppercase letters. If it returns nill then all the letters are lowercase and everything is good. if string.match(text, '%u') == nil then -- all chars are lowercase else -- an uppercase letter is found end I hope I understood correct what you want to do. Edited May 21, 2021 by SpecT 1 Link to comment
fairyoggy Posted May 22, 2021 Author Share Posted May 22, 2021 8 hours ago, SpecT said: Hey, Well you can use string.match and check whether there are any uppercase letters. If it returns nill then all the letters are lowercase and everything is good. if string.match(text, '%u') == nil then -- all chars are lowercase else -- an uppercase letter is found end I hope I understood correct what you want to do. This is what I need, thanks for the help. 1 Link to comment
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