slightly improved string_is_affirmative() implementation