docs-v2/content/flux/v0.x/stdlib/strings/isdigit.md

921 B

title description aliases menu weight flux/v0.x/tags related introduced
strings.isDigit() function The strings.isDigit() function tests if a single character string is a digit (0-9).
/influxdb/v2.0/reference/flux/functions/strings/isdigit/
/influxdb/v2.0/reference/flux/stdlib/strings/isdigit/
/influxdb/cloud/reference/flux/stdlib/strings/isdigit/
flux_0_x_ref
name parent
strings.isDigit strings
301
tests
/flux/v0.x/stdlib/strings/isletter/
0.18.0

The strings.isDigit() function tests if a single-character string is a digit (0-9).

Output data type: Boolean

import "strings"

strings.isDigit(v: "A")

// Returns false

Parameters

v

The single-character string to test.

Examples

Filter by columns with digits as values
import "strings"

data
    |> filter(fn: (r) => strings.isDigit(v: r.serverRef))