Add a function to set the first letter of each word in a string to upper case.
Anna Salyx
As the title says, it would be beneficial to have a "string.proper" (proper case) function in the string library that would upper case the first letter of each word in a string. example:
string.proper("this is a string") would return This Is A String.
It's every useful for names and headings.
Log In
Tapple Gao
Regarding the name, I've most often heard this function named "title" or "ToTitleCase"
Tapple Gao
I'd rather this function was added to both LSL and SLua, rather than be slua-exclusive, for two reasons:
- It's useful in both
- an ll function could handle non-ascii properly, as there is no unicode database in luau
luau lacks a unicode database, and this is unlikely to ever change, as it's huge compared to the size of luau. See for reference: