capitalize

From RPTools Wiki
Revision as of 18:03, 25 October 2019 by Phergus (talk | contribs) (Created page with "{{MacroFunction |name=capitalize |proposed=true |trusted=false |version=1.5.7 |description= Returns the passed string back with the first letter of each word capitalized. This...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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.