use string length when parsing strings