neo4j/community — pull request #891 by wfreeman (2012-09-30 03:56:33+00:00)
Title: Adding String functions.

Adding String functions specified by Andres in #334. Based on MathFunctions.

Included:
- docgen tests
- unit tests

Comment:
I used .toString to convert things to Strings in the asString() function in the StringHelper Trait, which might have some weird results if people put weird things as parameters (like nodes). I also try to normalize the LEFT/RIGHT/SUBSTRING functions if people pass in out of range values (giving the full string or an empty string, depending on whether the index started outside of the string, rather than an index out of bounds error). Other than that, I think the rest is pretty kosher. Feel free to give feedback!

```
start n=node(1) return trim(n), n;
+----------------------------------------+
| trim(n) | n |
+----------------------------------------+
| "Node[1]" | Node[1]{arr:["a","b","c"]} |
+----------------------------------------+
```