str: Support new prefix-matching feature in str_match.