position

Given an input string, returns the position corresponding to the end of the string.

For example:

assert(position("abc") == Position(0,3,3));
assert(position("abc
") == Position(1,0,4));
assert(position("abc

    ") == Position(2,4,8));
  1. Position position(string s)
    position
    (
    string s
    )
  2. Position position(ParseTree p)

Meta