Added string parsing function.