Skip to content

Global Helpers

titleize()

titleize() — returns string

Available in: controller, model, test, mapper, migrator, migration, tabledefinition Category: String Functions

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.

NameTypeRequiredDefaultDescription
wordstringyesThe text to turn into a title.
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>