Lines Matching refs:str
248 CPPUNIT_MESSAGE(ostr.str().c_str());
258 string const ref_long_str1("str 1");
259 string const ref_long_str2("str 2");
328 string str(c_str);
329 CPPUNIT_ASSERT( str == c_str );
331 str.erase(str.begin() + 1, str.end() - 1); // Erase all but first and last.
334 for (i = 0; i < str.size(); ++i) {
337 CPPUNIT_ASSERT( str[i] == 'H' );
340 CPPUNIT_ASSERT( str[i] == '!' );
347 str.insert(1, c_str);
348 str.erase(str.begin()); // Erase first element.
349 str.erase(str.end() - 1); // Erase last element.
350 CPPUNIT_ASSERT( str == c_str );
351 str.clear(); // Erase all.
352 CPPUNIT_ASSERT( str.empty() );
354 str = c_str;
355 CPPUNIT_ASSERT( str == c_str );
357 str.erase(1, str.size() - 1); // Erase all but first and last.
358 for (i = 0; i < str.size(); i++) {
361 CPPUNIT_ASSERT( str[i] == 'H' );
364 CPPUNIT_ASSERT( str[i] == '!' );
371 str.erase(1);
372 CPPUNIT_ASSERT( str == "H" );
457 string str;
463 str.reserve(100);
464 str = strorg;
467 str.insert(10, str.c_str() + 5, 15);
468 CPPUNIT_ASSERT( str == "This is teis test string st string for string calls" );
470 str = strorg;
471 str.insert(15, str.c_str() + 5, 25);
472 CPPUNIT_ASSERT( str == "This is test stis test string for stringring for string calls" );
474 str = strorg;
475 str.insert(0, str.c_str() + str.size() - 4, 4);
476 CPPUNIT_ASSERT( str == "allsThis is test string for string calls" );
478 str = strorg;
479 str.insert(0, str.c_str() + str.size() / 2 - 1, str.size() / 2 + 1);
480 CPPUNIT_ASSERT( str == "ng for string callsThis is test string for string calls" );
482 str = strorg;
483 string::iterator b = str.begin();
484 string::const_iterator s = str.begin() + str.size() / 2 - 1;
485 string::const_iterator e = str.end();
486 str.insert( b, s, e );
487 CPPUNIT_ASSERT( str == "ng for string callsThis is test string for string calls" );
489 str = strorg;
490 str.insert(str.begin(), str.begin() + str.size() / 2 - 1, str.end());
491 CPPUNIT_ASSERT( str == "ng for string callsThis is test string for string calls" );
496 str.insert(str.end(), int_vect.begin(), int_vect.end());
594 string str = strorg;
595 str.replace(5, 15, str.c_str(), 10);
596 CPPUNIT_ASSERT( str == "This This is tefor string calls" );
598 str = strorg;
599 str.replace(5, 5, str.c_str(), 10);
600 CPPUNIT_ASSERT( str == "This This is test string for string calls" );
605 str.replace(str.begin(), str.begin() + 11, cdeque.begin(), cdeque.end());
606 CPPUNIT_ASSERT( str == "Is test string for string calls" );
667 * size_type find(const basic_string<charT,traits,Allocator>& str,
671 * pos <= xpos and xpos + str.size() <= size();
672 * at(xpos+I) == str.at(I) for all elements I of the string controlled by str.
1089 mystring b = "str" + a;
1101 superstring( const string& str ) :
1102 s( str )
1105 superstring operator / (const string& str )
1106 { return superstring( s + "/" + str ); }
1108 superstring operator / (const char* str )
1109 { return superstring( s + "/" + str ); }
1135 const string& str() const
1157 CPPUNIT_CHECK( (mypath( string( "/root" ) ) / (rs1 + rs2)).str() == "/root/path1.ext" );
1275 string str("STLport");
1278 ostr << str;
1280 CPPUNIT_ASSERT( ostr.str() == str );
1283 istringstream istr(str);
1287 CPPUNIT_ASSERT( istr_content == str );
1290 istringstream istr(str);