Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Making the first letter upper case/lower case?

Say I have a table of random rumors. It may be more useful to write them starting with lower case letters, like so:

crocks have really been aggressive this spring
pants will be forbidden soon
there are sleeper agents of the enemy all around

This way I can say elsewhere: "And he also whispers to you that..." and then just <<print>> one of these from the passage. But in other places it may be better to begin with a capital letter. Is there any tag I can preface a <<print>> quote with to change register?

Comments

  • Put this in a script tagged passage:

    window.ucfirst = function (text) {
    return text.slice(0,1).toUpperCase() + text.slice(1);
    };
    Usage:

    With a string literal
    <<print ucfirst("some text here")>>

    With a $variable
    <<print ucfirst($message)>>
  • Right, thanks.
Sign In or Register to comment.