How to convert the first letter of a string into a lowercase letter?

I want to know if there is somehow a way to convert the first letter of a string into a lowercase letter. I’ve searched around the fourms and found ways to convert the first letter of a string into an uppercase, but when I try to make it convert to lowercase it doesn’t work. For example convert “SomethingOfSorts” to “somethingOfSorts” Any help or redirection would be greatly appreciated as I am new to the fourms.

You can use this function:

local function lowercaseText(text) -- String
    return string.lower(string.sub(text, 0, 1)) .. string.sub(text, 2)
end
1 Like

Thanks so much! I didn’t expect someone to respond so fast…

1 Like

I have used an old function that capitalizes the first letter and just changed string.upper to string.lower.