replace startsWith with a faster, loop-based implementation
2.1.4