inline
 bool
 compare_(
     S1 const&   s1
 ,   S2 const&   s2
 )
 {
     return compare_(c_str_data(s1), c_str_len(s1), c_str_data(s2), c_str_len(s2));
 }
    string_tokeniser(S1 const& str, delimiter_type const& delim)
        : m_str(c_str_data(str), c_str_len(str))
        , m_delimiter(delim)
    {
        STLSOFT_MESSAGE_ASSERT("Delimiter of zero-length", 0 != comparator_type::length(m_delimiter));

        STLSOFT_ASSERT(is_valid());
    }
    inline
    bool
    compare_and_assign_(
        S1 const&   input
    ,   V const&    v
    ,   S2&         output
    )
    {
        if(compare_(c_str_data(input), c_str_len(input), c_str_data(v.first), c_str_len(v.first)))
        {
            S2(c_str_data(v.second), c_str_len(v.second)).swap(output);

            return true;
        }

        return false;
    }
inline
bool
string_lookup(
    C const*    input
,   L const**   output
,   ss_size_t   numMappings
,   L const*    fromMappings
,   L const*    toMappings
)
{
    STLSOFT_ASSERT(NULL != output);
    STLSOFT_ASSERT(0 == numMappings || (NULL != fromMappings && NULL != toMappings));

    return ximpl_string_lookup_::string_lookup_from_ptr_and_len_(c_str_data(input), c_str_len(input), output, numMappings, fromMappings, toMappings);
}
Beispiel #5
0
inline exception_string::char_type const* c_str_data_a(exception_string const& xs)
{
    return c_str_data(xs);
}
Beispiel #6
0
/** \brief \ref group__concept__shim__string_access__c_str_len function
 *    for <code>struct dirent</code>.
 *
 * \ingroup group__concept__shim__string_access
 *
 * \return Length (in bytes) of the string form of <code>d</code>.
 */
inline us_size_t c_str_len_a(struct dirent const* d)
{
    return stlsoft_ns_qual(c_str_len)(c_str_data(d));
}