Beispiel #1
0
void diff_string(const string_type& a,
                 const string_type& b,
                 string_type& a_b,
                 string_type& b_a)
{
    a_b.clear();
    b_a.clear();
    
    if (a != b)
    {
        a_b = a;
        b_a = b;
    }
}
Beispiel #2
0
 void get_name_(FwdIter &begin, FwdIter end, string_type &name)
 {
     this->eat_ws_(begin, end);
     for(name.clear(); begin != end && this->is_alnum_(*begin); ++begin)
     {
         name.push_back(*begin);
     }
     this->eat_ws_(begin, end);
     detail::ensure(!name.empty(), regex_constants::error_paren, "incomplete extension");
 }
Beispiel #3
0
            void extract( string_type const & data, string_type & name, string_type & value, basic_cookie<Tag> & c )
            {
                std::size_t pos = data.find( string_traits_type::convert('=') );
                name = data.substr( 0,pos );
                if ( pos != string_type::npos )
                {
                    value = data.substr( pos+1 );
                }

                if ( !value.empty() )
                {
                    if ( *value.begin() == '"' && *value.rbegin() != '"' )
                    {
                        value = name + string_traits_type::convert("=") + value;
                        return;
                    }
                    boost::trim_if( value, boost::is_any_of( string_traits_type::convert("\"") ) );
                }
                set_value( name, value, c );
                name.clear();
                value.clear();
            }
Beispiel #4
0
 //! Cleanup method
 void clear()
 {
     m_Stream.clear();
     m_StreamBuf.clear();
     m_Buffer.clear();
 }