Beispiel #1
0
 void swap( basic_cookie2 & other )
 {
     basic_cookie<Tag>::swap( other );
     comment_url_.swap( other.comment_url_ );
     std::swap( discard_, other.discard_ );
     ports_.swap( other.ports_ );
 }
Beispiel #2
0
 void swap( basic_cookie & other )
 {
     name_.swap( other.name_ );
     value_.swap( other.value_ );
     comment_.swap( other.comment_ );
     domain_.swap( other.domain_ );
     max_age_.swap( other.max_age_ );
     path_.swap( other.path_ );
     version_.swap( other.version_ );
     expires_.swap( other.expires_ );
     std::swap( http_only_,other.http_only_ );
     std::swap( secure_,other.secure_ );
 }
Beispiel #3
0
  /** \brief Replace all occurrences of a substring with another string. 
      \param strFind The string that shall be replaced.
      \param strReplaceWith The string that should be inserted instead of strFind
  */
  void ParserError::ReplaceSubString( string_type &strSource,
                                      const string_type &strFind,
                                      const string_type &strReplaceWith)
  {
    string_type strResult;
    string_type::size_type iPos(0), iNext(0);

    for(;;)
    {
      iNext = strSource.find(strFind, iPos);
      strResult.append(strSource, iPos, iNext-iPos);

      if( iNext==string_type::npos )
        break;

      strResult.append(strReplaceWith);
      iPos = iNext + strFind.length();
    } 

    strSource.swap(strResult);
  }