strings.toTitle() function

The strings.toTitle() function converts all characters in a string to title case.

Output data type: String

import "strings"

strings.toTitle(v: "a flux of foxes")

// returns "A FLUX OF FOXES"



The string value to convert.

Data type: String


Covert characters in a string to title case
import "strings"

  |> map(fn: (r) => ({ r with pageTitle: strings.toTitle(v: r.pageTitle) }))

The difference between toTitle and toUpper

The results of toTitle() and toUpper are often the same, however the difference is visible with special characters:

str = "dz"

strings.toTitle(v: str) // Returns Dz
strings.toUpper(v: str) // Returns DZ

New! Cloud or OSS?

InfluxDB OSS 2.0 release candidate 0

InfluxDB OSS v2.0.rc0 includes breaking changes that require a manual upgrade from all alpha and beta versions. For information, see:

Upgrade to InfluxDB OSS v2.0.rc0