docs-v2/content/v2.0/reference/flux/functions/strings/title.md

793 B

title description menu weight related
strings.title() function The strings.title() function converts a string to title case.
v2_0_ref
name parent
strings.title Strings
301
/v2.0/reference/flux/functions/strings/tolower
/v2.0/reference/flux/functions/strings/totitle
/v2.0/reference/flux/functions/strings/toupper

The strings.title() function converts a string to title case.

Output data type: String

import "strings"

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

// returns "A Flux Of Foxes"

Parameters

v

The string value to convert.

Data type: String

Examples

Convert all values of a column to title case
import "strings"

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