position

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

For example:

1 assert(position("abc") == Position(0,3,3));
2 assert(position("abc
3 ") == Position(1,0,4));
4 assert(position("abc
5 
6     ") == Position(2,4,8));
  1. Position position(string s)
    position
    (
    string s
    )
  2. Position position(const ParseTree p)

Meta