diff --git a/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc b/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc index 8c82b53bb..bc07c2ead 100644 --- a/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc +++ b/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc @@ -16,6 +16,30 @@ New features are added to the language continuously, and occasionally, some feat This section lists all of the features that have been removed, deprecated, added, or extended in different Cypher versions. Replacement syntax for deprecated and removed features are also indicated. +[[cypher-deprecations-additions-removals-5.16]] +== Neo4j 5.16 + +=== 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.15]] == Neo4j 5.15 @@ -92,7 +116,7 @@ label:updated[] MATCH (n:Label) WHERE $param IS :: STRING NOT NULL AND n.prop = $param ---- -| `IS :: STRING NOT NULL` is now an xref:planning-and-tuning/query-tuning/indexes.adoc#text-index-type-predicate-expressions[index-compatible predicate]. +| `IS :: STRING NOT NULL` is now an xref:planning-and-tuning/query-tuning/indexes.adoc#text-index-type-predicate-expressions[index-compatible predicate]. |=== 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..6f770d0bf 100644 --- a/modules/ROOT/pages/functions/string.adoc +++ b/modules/ROOT/pages/functions/string.adoc @@ -148,6 +148,136 @@ 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*