Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
08-27-2018 03:05 AM
I'm looking for a simple string function to get the first position of a substring in a string. Something equivalent of indexOf(), strPos(), charIndex()... Didn't find anything in Cypher or Apoc - only issue 1041, open since 2013?
08-27-2018 03:19 AM
There is nothing direct in Cypher. I was totally sure we already had it in apoc.
Gonna add it this week.
As a workaround in the meantime you can use split + length:
RETURN length(split("ab-c","-")[0])
Added an issue here: https://github.com/neo4j-contrib/neo4j-apoc-procedures/issues/896
12-24-2019 09:29 AM
Did apoc.text.indexOf get dropped? I am sure I used it in the past, but in v3.3.0.2 it does not exist
12-25-2019 02:53 AM
I'm using 3.5.0.4 and 3.5.0.5, there apoc.text.indexOf exists. In the 4.0rc code also. I'm not sure in which version it was introduced.
All the sessions of the conference are now available online