Casefold
Casefold( value, [ normalizer ] )
Casefold( value, [ normalizer ] )
Casefold( value, [ normalizer ] )
Casefold( value, [ normalizer ] )
casefold( value, [ normalizer ] )
Casefold( value, [ normalizer ] )
Description
The Casefold
function returns a normalized string. When strings are
transformed into their normalized forms, canonical-equivalent strings
have precisely the same binary representation. Then, a binary comparison
function such as equals
can compare two strings for case-insensitive
matching.
The Unicode Standard provides well-defined normalization forms (see Section 5.18, Case Mappings).
By default, Fauna uses NKFCCaseFold
as recommended by the
W3C, but provides NFKCCaseFold
,
NFC
, NFD
, NFKC
, NFKD
.
Examples
The following query converts the string "Hen Wen" to "hen wen" to support case-insensitive matching:
StringV(hen wen)
hen wen
"hen wen"
hen wen
hen wen
'hen wen'
Was this article helpful?
We're sorry to hear that.
Tell us how we can improve!
Visit Fauna's forums
or email docs@fauna.com
Thank you for your feedback!