| Home | Libraries | People | FAQ | More

## Function template find_match

boost::date_time::find_match — Find index of a string in either of 2 arrays.

## Synopsis

    // In header: <boost/date_time/date_parsing.hpp>

    template<typename charT>
      short find_match(const charT *const * short_names,
                       const charT *const * long_names, short size,
                       const std::basic_string< charT > & s);

## Description

find_match searches both arrays for a match to 's'. Both arrays must contain 'size' elements. The index of the match is returned. If no match is found, 'size' is returned. Ex. "Jan" returns 0, "Dec" returns 11, "Tue" returns 2. 'size' can be sent in with: greg_month::max() (which 12), greg_weekday::max() + 1 (which is 7) or date_time::NumSpecialValues