CapFirst - Templates [SOLVED]

K.V.

I can't get CapFirst to work on a template.

Am I being special, or does it simply not work?


K.V.

I was being special.

I had:
Template: dword
{if game.lewd:damn|darn}

I needed to do this:

msg(CapFirst(ProcessText(Template(dword))))

...but I only had this:

msg(CapFirst(Template(dword)))

Yep :p I thought that might be the case from the thread title.

msg() runs the text processor to change the string, then sends it to the browser. If you do CapFirst before running the text processor, you're just capitalising the { (which makes no difference, because it isn't a letter)


This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums