adding name parsing functionality to the String class