Contact Free trial Login


capitalize(String): String

Capitalizes the first letter of each word in a string.

It also removes underscores between words and puts a space before each capitalized word.


Name Description


The string to capitalize.


This example capitalizes a set of strings.


%dw 2.0
import * from dw::core::Strings
output application/json
  "a" : capitalize("customer"),
  "b" : capitalize("customer_first_name"),
  "c" : capitalize("customer NAME"),
  "d" : capitalize("customerName")


  "a": "Customer",
  "b": "Customer First Name",
  "c": "Customer Name",
  "d": "Customer Name"

capitalize(Null): Null

Helper function that allows capitalize to work with null values.

We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used and to tailor advertising. You can read more and make your cookie choices here. By continuing to use this site you are giving us your consent to do this.