Global Helpers
titleize()
Signature
Section titled “Signature”titleize() — returns string
Available in: controller, model, test, mapper, migrator, migration, tabledefinition
Category: String Functions
Description
Section titled “Description”Converts a string so that the first letter of each word is capitalized, producing a cleaner, title-like appearance. It is useful for formatting headings, labels, or any text that should follow title case conventions.
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
word | string | yes | — | The text to turn into a title. |
Examples
Section titled “Examples”1. Basic usage
titleize("Wheels is a framework for ColdFusion")
// Output: "Wheels Is A Framework For ColdFusion"
2. Works with single words
titleize("hello")
// Output: "Hello"
3. Works with multiple words including numbers
titleize("coldfusion 2025 features")
// Output: "Coldfusion 2025 Features"
4. Can be used in views for dynamic labels
<h1>titleize(article.title)</h1>