capitalize

From RPTools Wiki
Revision as of 18:04, 25 October 2019 by Phergus (talk | contribs)
Jump to navigation Jump to search

 Note: This refers to a proposed change that has not been implemented in the main code base yet.

capitalize() Function

Introduced in version 1.5.7
Returns the passed string back with the first letter of each word capitalized. This means that "bump player health" becomes "Bump Player Health". Numbers and symbols in the strings are treated as word boundaries.

Usage

capitalize(input)

Parameters

  • input - String to be converted.

Example

Converting character name.
[r: name = getTokenName()]<br>
[r: capitalize(name)]

Returns:

ichabod crane
Ichabod Crane

String with numbers and symbols.

[r: capitalize("a 4ever 2/una")]

Returns:

A 4Ever 2Una

See Also

Version Changes

  • 1.5.7 - Added function.