Refactoring functions about find_first_not_of.