Back to Influxdb

strings.isUpper() function

content/flux/v0/stdlib/strings/isupper.md

latest2.3 KB
Original Source
<!------------------------------------------------------------------------------ IMPORTANT: This page was generated from comments in the Flux source code. Any edits made directly to this page will be overwritten the next time the documentation is generated. To make updates to this documentation, update the function comments above the function definition in the Flux source code: https://github.com/influxdata/flux/blob/master/stdlib/strings/strings.flux#L606-L606 Contributing to Flux: https://github.com/influxdata/flux#contributing Fluxdoc syntax: https://github.com/influxdata/flux/blob/master/docs/fluxdoc.md ------------------------------------------------------------------------------->

strings.isUpper() tests if a single character string is uppercase.

Function type signature
js
(v: string) => bool

{{% caption %}} For more information, see Function type signatures. {{% /caption %}}

Parameters

v

({{< req >}}) Single-character string value to test.

Examples

Filter by columns with single-letter uppercase values

js
import "strings"

data
    |> filter(fn: (r) => strings.isUpper(v: r._value))

{{< expand-wrapper >}} {{% expand "View example input and output" %}}

Input data

_time*tag_value
2022-01-01T00:00:00Zt1a
2022-01-01T00:01:00Zt1B
2022-01-01T00:02:00Zt1C
2022-01-01T00:03:00Zt1d
2022-01-01T00:04:00Zt1e
_time*tag_value
2022-01-01T00:00:00Zt2F
2022-01-01T00:01:00Zt2g
2022-01-01T00:02:00Zt2H
2022-01-01T00:03:00Zt2i
2022-01-01T00:04:00Zt2J

Output data

_time*tag_value
2022-01-01T00:01:00Zt1B
2022-01-01T00:02:00Zt1C
_time*tag_value
2022-01-01T00:00:00Zt2F
2022-01-01T00:02:00Zt2H
2022-01-01T00:04:00Zt2J

{{% /expand %}} {{< /expand-wrapper >}}