Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
53 lines (39 sloc) 881 Bytes
title description menu
strings.equalFold() function
The strings.equalFold() function reports whether two UTF-8 strings are equal under Unicode case-folding.
flux_0_36
name parent weight
strings.equalFold
Strings
1

The strings.equalFold() function reports whether two UTF-8 strings are equal under Unicode case-folding.

Output data type: Boolean

import "strings"

strings.equalFold(v: "Go", t: "go")

// returns true

Parameters

v

The string value to compare.

Data type: String

t

The string value to compare against.

Data type: String

Examples

Ignore case when testing if two strings are the same
import "strings"

data
  |> map(fn: (r) => ({
      r with
      string1: r.string1,
      string2: r.string2,
      same: strings.equalFold(v: r.string1, t: r.string2)
    })
  )
You can’t perform that action at this time.