Parse category name; strip trailing whitespace