Skip to content

Global Helpers

humanize()

humanize() — returns string

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

Converts a camel-cased or underscored string into more readable, human-friendly text by inserting spaces and capitalizing words. You can also specify words that should be replaced or kept in a specific format.

NameTypeRequiredDefaultDescription
textstringyesText to humanize.
exceptstringnoA list of strings (space separated) to replace within the output.
1. Humanize a string, will result in "Wheels Is A Framework"
#humanize(text="wheelsIsAFramework")#

2.Humanize a string, force wheels to replace "Cfml" with "CFML"
#humanize(text="wheelsIsACfmlFramework", except="CFML")#