replace splitString with more clever version from apache StringUtils (ported to scala)