strings.isDigit() function

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

*Output data type: Boolean*

  1. import "strings"
  2. strings.isDigit(v: "A")
  3. // returns false

Parameters

v

The single-character string to test.

*Data type: String*

Examples

Filter by columns with digits as values
  1. import "strings"
  2. data
  3. |> filter(fn: (r) => strings.isDigit(v: r.serverRef))

Related articles