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"
Parameters
v
The string value to convert.
Data type: String
Examples
Covert characters in a string to title case
import "strings"
data
|> 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
Bug Reports and Feedback
Thank you for being willing to help test InfluxDB v2.0 alpha! Feedback and bug reports are welcome and encouraged both for InfluxDB and this documentation. Submit feedback using one of the following methods:
- Post in the InfluxData Community
- In the InfluxDB UI, click Feedback in the left navigation bar.
- Submit documentation issues to the InfluxDB 2.0 documentation repository.
- Submit InfluxDB issues to the InfluxDB repository.