added string util method to cut a string at a given position