move string methods to js-string