Fix off-by-one error in parseLocaleString

Fix off-by-one error in StringUtils.parseLocaleString()

Issue: SPR-10364