FasterXML/jackson-core — pull request #170 by lordofthejars (2014-12-03 11:03:24+00:00)
Title: Adds head operation in JsonPointer class. Resolves issue #169.

I have implemented a head method to return all the segments of a jsonpointer expression. The head is the current segment until last non-leaf segment.

Algorithm is quite simple to follow and I have found no way to avoid doing two iterations (one for finding first slash for tail operation), and another one for finding the last slash.

Let's do a code review using github and if you think that the algorithm can be improved in any way, please point it out and I will fix it.