apoc.text.slug

Details

Syntax

apoc.text.slug(text [, delimiter ])

Description

Replaces the whitespace in the given STRING with the given delimiter.

Arguments

Name

Type

Description

text

STRING

The string whose whitespace is to be replaced.

delimiter

STRING

The delimiter to replace the whitespace with. The default is: -.

Returns

STRING

Usage Examples

RETURN apoc.text.slug("Neo4j Aura") AS output;
Results
output

"Neo4j-Aura"

The default delimiter is -. We can, however, pass in a custom delimiter as the second parameter:

RETURN apoc.text.slug("Neo4j Aura", ".") AS output;
Results
output

"Neo4j.Aura"