Hello everyone,
I am working on editing a calendar conky widget authored by Bleys. The main piece of the widget is the .lua file. In this file there is a variable called wetter[1] and it has weather description information which is always in all lowercase letters. I would like every word in the description to have it's first letter capitolized (so "scattered clouds" becomes "Scattered Clouds" etc).
Does anyone know .lua well enough to help?
Thank you for reading,
Logan
.lua help please. Capitolizing all lowercase variable contents [SOLVED]
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
- Logansfury
- Level 6
- Posts: 1237
- Joined: Fri Oct 27, 2023 4:08 pm
- Location: Las Vegas NV, USA
.lua help please. Capitolizing all lowercase variable contents [SOLVED]
Last edited by Logansfury on Thu Feb 08, 2024 4:04 am, edited 1 time in total.
- Logansfury
- Level 6
- Posts: 1237
- Joined: Fri Oct 27, 2023 4:08 pm
- Location: Las Vegas NV, USA
Re: .lua help please. Capitolizing all lowercase variable contents
I got the answer from the net. Im my case it was using the code:
The output looks much better with the capitol formatting
Code: Select all
wetter[1] = string.gsub(wetter[1], "%f[%l]%l", string.upper)