[
https://issues.apache.org/jira/browse/TINKERPOP-1639?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15882395#comment-15882395
]
ASF GitHub Bot commented on TINKERPOP-1639:
-------------------------------------------
GitHub user dkuppitz opened a pull request:
https://github.com/apache/tinkerpop/pull/564
TINKERPOP-1639 Support simple String operations
https://issues.apache.org/jira/browse/TINKERPOP-1639
Added support for simple String operations. `CountLocalStep`,
`RangeLocalStep` and `TailLocalStep` can now imitate `String::length()` and
`String::substring()`.
A few examples:
```
gremlin> g.V().values("name").count(local)
==>5
==>5
==>3
==>4
==>6
==>5
gremlin> g.V().values("name").limit(local, 3)
==>mar
==>vad
==>lop
==>jos
==>rip
==>pet
gremlin> g.V().values("name").tail(local, 4)
==>arko
==>adas
==>lop
==>josh
==>pple
==>eter
gremlin> g.V().values("name").group().by(range(local, 1, 2)).next()
==>a=[marko, vadas]
==>e=[peter]
==>i=[ripple]
==>o=[lop, josh]
```
VOTE: +1
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/apache/tinkerpop TINKERPOP-1639
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/tinkerpop/pull/564.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #564
----
commit c6f92c9ef65fd711028b37745eed6e94e9163f0b
Author: Daniel Kuppitz <[email protected]>
Date: 2017-02-24T10:13:53Z
Added support for simple String operations. `CountLocalStep`,
`RangeLocalStep` and `TailLocalStep` can now imitate `String::length()` and
`String::substring()`.
----
> Support simple String operations
> --------------------------------
>
> Key: TINKERPOP-1639
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1639
> Project: TinkerPop
> Issue Type: Improvement
> Components: process
> Affects Versions: 3.2.4
> Reporter: Daniel Kuppitz
> Assignee: Daniel Kuppitz
> Fix For: 3.3.0, 3.2.5
>
>
> Addd support for simple String operations, e.g. {{length()}} and
> {{substring()}}. The latter will also allow us to write {{startsWith()}} and
> {{endsWith()}} filters.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)