String.captialize()

Tinderbox Icon


Operator Type:   Function
Operator Scope of Action:   Item
Operator Purpose:   Formatting

String.captitalise()

New to v5.9.0. Returns the target string, transforming the initial letter of each word to a capital letter and leaving all other characters unchanged.

The function can be chained to both string data and to string literals:

$MyString.capitalize() 

"my new title".capitalize() 

The latter gives "My New Title".

The trailing parentheses may be omitted:

$MyString.capitalize 

If 'title case' is required from a mixed case string, chain with .lowercase():

"my nEW title".lowercase.capitalize ("My New Title")

Bear in mind the latter won't deal with all capital acronyms (UPS, UNHCR) or CamelCase words (AstroTurf, FedEx).

Functionally equivalent to capitalize().


Possible relevant notes (via "Similar Notes" feature):

Up: Full Operator List
Previous: sqrt(argument)  Next: String.contains("pattern") 

A Tinderbox Reference File : Actions & Rules : Operators : Full Operator List : String.captialize()

Quicklinks: Attributes | Action Codes | Export Codes | Designators | Date Formats | aTbRef Site Map

[Last updated: 16 May 2012, using v5.11.1]


Search:

Google search aTbRef for:  


Creative Commons Licence

aTbRef by Mark Anderson is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.

[See aTbRef CC licence Attribution & Waiver info]

Made with Tinderbox