Script lua to show the text in uppercase, lowercase or sentence format in a string meter in Rainmeter.
I was carrying out a Rainmeter project and it occurred to me to create this script for my skins.
I've thought about adding more text styles, but I still can not think of cases that might be needed for the presentation of the strings.

Script lua to show the text in uppercase, lowercase or sentence format in a string meter in Rainmeter.

Your code is for sure useful in many cases, however sometimes a much easier solution does exist: you can add a StringCase option to the String meters. It has four possible values:

None - the string isn't altered, it is show as it is.

Upper - All letters converted uppercase.

Lower - All letters converted lowercase.

Proper - The first letter of all words is converted uppercase. Here is a great difference, because using the ora function of your lua script, you get uppercase only the first letter of the whole string, while setting the StringCase to Proper sets uppercase all first letter of all words within the string.

Again, please don't misunderstand me, your code can be and is useful in many cases, I just wanted to show an (at least sometimes) usable alternative.

Yes, you can use the StringCase, but in my case I wanted only part of the text to be modified and I could not do it with StringCase.
The StringCase modifies all the text that is shown in the meter.
thanks for your contribution.

Yep, it's an interesting option, added on July 31, 2015 (version 3.3.2423) to the String meters, which indeed worth to be studied a little bit.
However I don't contest the benefits of your code. In many cases it can be useful and don't be disappointed by my reply to your initial message, your code is definitely useful. Just had to add that comment.