simplify startsWith / endsWith

- add position to startsWith and endsWith

closes #337