Trim keyword string.