diff --git a/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc b/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc index 29e3c17b5..891ad5096 100644 --- a/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc +++ b/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc @@ -32,9 +32,9 @@ label:deprecated[] RETURN 1 as my\u0085identifier ---- a| -The Unicode character \`\u0085` is deprecated for unescaped identifiers and will be considered as a whitespace character in the future. +The Unicode character \`\u0085` is deprecated for unescaped identifiers and will be considered as a whitespace character in the future. To continue using it, escape the identifier by adding backticks around the identifier. -This applies to all unescaped identifiers in Cypher, such as label expressions, properties, variable names or parameters. +This applies to all unescaped identifiers in Cypher, such as label expressions, properties, variable names or parameters. In the given example, the quoted identifier would be \`my�identifier`. a| @@ -65,6 +65,27 @@ The following Unicode Characters are deprecated in identifiers: |=== +=== New features + +[cols="2", options="header"] +|=== +| Feature +| Details + +a| +label:functionality[] +label:new[] + +[source, cypher, role=noheader] +---- +RETURN normalize("string", NFC) +---- + +| Introduction of a xref::functions/string.adoc#functions-normalize[normalize()] function. +Normalize a `STRING` according to the specified normalization form, which can be of type `NFC`, `NFD`, `NFKC` or `NFKD`. + +|=== + [[cypher-deprecations-additions-removals-5.14]] == Neo4j 5.14 diff --git a/modules/ROOT/pages/functions/index.adoc b/modules/ROOT/pages/functions/index.adoc index 55450b53c..3e6623186 100644 --- a/modules/ROOT/pages/functions/index.adoc +++ b/modules/ROOT/pages/functions/index.adoc @@ -496,6 +496,12 @@ These functions are used to manipulate strings or to create a string representat | `ltrim(input :: STRING) :: STRING` | Returns the given `STRING` with leading whitespace removed. +1.2+| xref::functions/string.adoc#functions-normalize[`normalize()`] +| `normalize(input :: STRING) :: STRING` +| Returns the given `STRING` normalized using the normal form 'NFC'. +| `normalize(input :: STRING, normalForm = NFC :: [NFC, NFD, NFKC, NFKD]) :: STRING` +| Returns the given `STRING` normalized according to the specified normalization form. + 1.1+| xref::functions/string.adoc#functions-replace[`replace()`] | `replace(original :: STRING, search :: STRING, replace :: STRING) :: STRING` | Returns a `STRING` in which all occurrences of a specified search `STRING` in the given `STRING` have been replaced by another (specified) replacement `STRING`. diff --git a/modules/ROOT/pages/functions/string.adoc b/modules/ROOT/pages/functions/string.adoc index ee3009dbf..de3576d50 100644 --- a/modules/ROOT/pages/functions/string.adoc +++ b/modules/ROOT/pages/functions/string.adoc @@ -148,6 +148,138 @@ RETURN ltrim(' hello') ====== + + +[[functions-normalize]] +== normalize() + +`normalize()` returns the given `STRING` normalized using the `NFC` normalization form. + +*Syntax:* + +[source, syntax, role="noheader"] +---- +normalize(input) +---- + +*Returns:* + +|=== + +| `STRING` + +|=== + +*Arguments:* + +[options="header"] +|=== +| Name | Description + +| `input` +| An expression that returns a `STRING`. + +|=== + +*Considerations:* + +|=== + +| `normalize(null)` returns `null`. + +|=== + + +.+normalize()+ +====== + +.Query +[source, cypher, indent=0] +---- +RETURN normalize('\u212B') = '\u00C5' AS result +---- + +.Result +[role="queryresult",options="header,footer",cols="1*