modify card_value_from_card_string not to depend on a trailing zero byte