Is there a way to get the length of a string in Neo4j cypher?

advertisements

pretty simple question, is there a way to get length of a string in Neo4j cypher? I cannot find any document for that.

thanks


You can use the length() scalar function like:

MATCH (n:Crew)-[r:KNOWS*]-m
WHERE n.name='Neo'
RETURN n AS Neo,r,m,length(n.name)

Check out this example here.