Making the first letter in a string uppercase.

I know how to use string.upper and string.lower but I’m confused as to how I make a certain letter of the string uppercase.
Here is my code:


concommand.Add("printlower",function()
for k,v in pairs(player.GetAll()) do
print(v:Name()..": "..v:SteamID())
end)

Here’s a cool snippet:


( string.gsub( "willox", "^.", string.upper ) ) -- returns "Willox"

You can read more about Lua patterns @ http://www.lua.org/pil/20.2.html or in https://dl.dropboxusercontent.com/u/14265905/Programming%20in%20Lua%205.1.pdf.
I’ve wrapped the string.gsub call in parenthesis because it returns multiple variables, the parenthesis will cause the expression to evaluate to only the first value.

Alternatively you can do loads of horrible code involving string.sub, string.length and loops.