basic_string.h File Reference


Detailed Description

This is an internal header file, included by other library headers. You should not attempt to use it directly.

Definition in file basic_string.h.#include <bits/atomicity.h>
#include <debug/debug.h>

Include dependency graph for basic_string.h:

Include dependency graph

Go to the source code of this file.

Namespaces

Classes

Defines

Functions


Function Documentation

basic_istream< CharT, Traits > & getline basic_istream< CharT, Traits > &  __is,
basic_string< CharT, Traits, Alloc > &  str
[inline]
 

Read a line from stream into a string.

Parameters:
is Input stream.
str Buffer to store into.
Returns:
Reference to the input stream.
Stores characters from is into str until '
' is found, the end of the stream is encountered, or str.max_size() is reached. If is.width() is non-zero, that is the limit on the number of characters stored into str. Any previous contents of str are erased. If end of line was encountered, it is extracted but not stored into str. Definition at line 1274 of file istream.tcc.

basic_istream< CharT, Traits > & getline basic_istream< CharT, Traits > &  __is,
basic_string< CharT, Traits, Alloc > &  str,
CharT  __delim
 

Read a line from stream into a string.

Parameters:
is Input stream.
str Buffer to store into.
delim Character marking end of line.
Returns:
Reference to the input stream.
Stores characters from is into str until delim is found, the end of the stream is encountered, or str.max_size() is reached. If is.width() is non-zero, that is the limit on the number of characters stored into str. Any previous contents of str are erased. If delim was encountered, it is extracted but not stored into str. Definition at line 1205 of file istream.tcc.

References basic_string::append(), basic_string::erase(), ios_base::iostate, and basic_string::max_size().

bool operator!= const basic_string< CharT, Traits, Alloc > &  __lhs,
const CharT *  __rhs
[inline]
 

Test difference of string and C string.

Parameters:
lhs String.
rhs C string.
Returns:
True if lhs.compare(rhs) != 0. False otherwise.
Definition at line 2108 of file basic_string.h.

bool operator!= const CharT *  __lhs,
const basic_string< CharT, Traits, Alloc > &  __rhs
[inline]
 

Test difference of C string and string.

Parameters:
lhs C string.
rhs String.
Returns:
True if rhs.compare(lhs) != 0. False otherwise.
Definition at line 2096 of file basic_string.h.

References basic_string::compare().

bool operator!= const basic_string< CharT, Traits, Alloc > &  __lhs,
const basic_string< CharT, Traits, Alloc > &  __rhs
[inline]
 

Test difference of two strings.

Parameters:
lhs First string.
rhs Second string.
Returns:
True if lhs.compare(rhs) != 0. False otherwise.
Definition at line 2084 of file basic_string.h.

References basic_string::compare().

basic_string<CharT, Traits, Alloc> operator+ const basic_string< CharT, Traits, Alloc > &  __lhs,
CharT  __rhs
[inline]
 

Concatenate string and character.

Parameters:
lhs First string.
rhs Last string.
Returns:
New string with lhs followed by rhs.
Definition at line 2029 of file basic_string.h.

basic_string<CharT, Traits, Alloc> operator+ const basic_string< CharT, Traits, Alloc > &  __lhs,
const CharT *  __rhs
[inline]
 

Concatenate string and C string.

Parameters:
lhs First string.
rhs Last string.
Returns:
New string with lhs followed by rhs.
Definition at line 2013 of file basic_string.h.

References basic_string::append().

basic_string< CharT, Traits, Alloc > operator+ CharT  __lhs,
const basic_string< CharT, Traits, Alloc > &  __rhs
 

Concatenate character and string.

Parameters:
lhs First string.
rhs Last string.
Returns:
New string with lhs followed by rhs.
Definition at line 656 of file basic_string.tcc.

References basic_string::size().

basic_string< CharT, Traits, Alloc > operator+ const CharT *  __lhs,
const basic_string< CharT, Traits, Alloc > &  __rhs
 

Concatenate C string and string.

Parameters:
lhs First string.
rhs Last string.
Returns:
New string with value of lhs followed by rhs.
Definition at line 640 of file basic_string.tcc.

References basic_string::reserve(), and basic_string::size().

basic_string<CharT, Traits, Alloc> operator+ const basic_string< CharT, Traits, Alloc > &  __lhs,
const basic_string< CharT, Traits, Alloc > &  __rhs
 

Concatenate two strings.

Parameters:
lhs First string.
rhs Last string.
Returns:
New string with value of lhs followed by rhs.
Definition at line 1976 of file basic_string.h.

References basic_string::append().

Referenced by std::inserter().

bool operator< const CharT *  __lhs,
const basic_string< CharT, Traits, Alloc > &  __rhs
[inline]
 

Test if C string precedes string.

Parameters:
lhs C string.
rhs String.
Returns:
True if lhs precedes rhs. False otherwise.
Definition at line 2145 of file basic_string.h.

References basic_string::compare().

bool operator< const basic_string< CharT, Traits, Alloc > &  __lhs,
const CharT *  __rhs
[inline]
 

Test if string precedes C string.

Parameters:
lhs String.
rhs C string.
Returns:
True if lhs precedes rhs. False otherwise.
Definition at line 2133 of file basic_string.h.

bool operator< const basic_string< CharT, Traits, Alloc > &  __lhs,
const basic_string< CharT, Traits, Alloc > &  __rhs
[inline]
 

Test if string precedes string.

Parameters:
lhs First string.
rhs Second string.
Returns:
True if lhs precedes rhs. False otherwise.
Definition at line 2121 of file basic_string.h.

basic_ostream< CharT, Traits > & operator<< basic_ostream< CharT, Traits > &  __os,
const basic_string< CharT, Traits, Alloc > &  str
 

Write string to a stream.

Parameters:
os Output stream.
str String to write out.
Returns:
Reference to the output stream.
Output characters of str into os following the same rules as for writing a C string. Definition at line 643 of file ostream.tcc.

References std::streamsize.

bool operator<= const CharT *  __lhs,
const basic_string< CharT, Traits, Alloc > &  __rhs
[inline]
 

Test if C string doesn't follow string.

Parameters:
lhs C string.
rhs String.
Returns:
True if lhs doesn't follow rhs. False otherwise.
Definition at line 2219 of file basic_string.h.

References basic_string::compare().

bool operator<= const basic_string< CharT, Traits, Alloc > &  __lhs,
const CharT *  __rhs
[inline]
 

Test if string doesn't follow C string.

Parameters:
lhs String.
rhs C string.
Returns:
True if lhs doesn't follow rhs. False otherwise.
Definition at line 2207 of file basic_string.h.

bool operator<= const basic_string< CharT, Traits, Alloc > &  __lhs,
const basic_string< CharT, Traits, Alloc > &  __rhs
[inline]
 

Test if string doesn't follow string.

Parameters:
lhs First string.
rhs Second string.
Returns:
True if lhs doesn't follow rhs. False otherwise.
Definition at line 2195 of file basic_string.h.

bool operator== const basic_string< CharT, Traits, Alloc > &  __lhs,
const CharT *  __rhs
[inline]
 

Test equivalence of string and C string.

Parameters:
lhs String.
rhs C string.
Returns:
True if lhs.compare(rhs) == 0. False otherwise.
Definition at line 2071 of file basic_string.h.

bool operator== const CharT *  __lhs,
const basic_string< CharT, Traits, Alloc > &  __rhs
[inline]
 

Test equivalence of C string and string.

Parameters:
lhs C string.
rhs String.
Returns:
True if rhs.compare(lhs) == 0. False otherwise.
Definition at line 2059 of file basic_string.h.

References basic_string::compare().

bool operator== const basic_string< CharT, Traits, Alloc > &  __lhs,
const basic_string< CharT, Traits, Alloc > &  __rhs
[inline]
 

Test equivalence of two strings.

Parameters:
lhs First string.
rhs Second string.
Returns:
True if lhs.compare(rhs) == 0. False otherwise.
Definition at line 2047 of file basic_string.h.

bool operator> const CharT *  __lhs,
const basic_string< CharT, Traits, Alloc > &  __rhs
[inline]
 

Test if C string follows string.

Parameters:
lhs C string.
rhs String.
Returns:
True if lhs follows rhs. False otherwise.
Definition at line 2182 of file basic_string.h.

References basic_string::compare().

bool operator> const basic_string< CharT, Traits, Alloc > &  __lhs,
const CharT *  __rhs
[inline]
 

Test if string follows C string.

Parameters:
lhs String.
rhs C string.
Returns:
True if lhs follows rhs. False otherwise.
Definition at line 2170 of file basic_string.h.

bool operator> const basic_string< CharT, Traits, Alloc > &  __lhs,
const basic_string< CharT, Traits, Alloc > &  __rhs
[inline]
 

Test if string follows string.

Parameters:
lhs First string.
rhs Second string.
Returns:
True if lhs follows rhs. False otherwise.
Definition at line 2158 of file basic_string.h.

Referenced by std::operator>().

bool operator>= const CharT *  __lhs,
const basic_string< CharT, Traits, Alloc > &  __rhs
[inline]
 

Test if C string doesn't precede string.

Parameters:
lhs C string.
rhs String.
Returns:
True if lhs doesn't precede rhs. False otherwise.
Definition at line 2256 of file basic_string.h.

References basic_string::compare().

bool operator>= const basic_string< CharT, Traits, Alloc > &  __lhs,
const CharT *  __rhs
[inline]
 

Test if string doesn't precede C string.

Parameters:
lhs String.
rhs C string.
Returns:
True if lhs doesn't precede rhs. False otherwise.
Definition at line 2244 of file basic_string.h.

bool operator>= const basic_string< CharT, Traits, Alloc > &  __lhs,
const basic_string< CharT, Traits, Alloc > &  __rhs
[inline]
 

Test if string doesn't precede string.

Parameters:
lhs First string.
rhs Second string.
Returns:
True if lhs doesn't precede rhs. False otherwise.
Definition at line 2232 of file basic_string.h.

Referenced by std::operator>=().

basic_istream< CharT, Traits > & operator>> basic_istream< CharT, Traits > &  __is,
basic_string< CharT, Traits, Alloc > &  str
 

Read stream into a string.

Parameters:
is Input stream.
str Buffer to store into.
Returns:
Reference to the input stream.
Stores characters from is into str until whitespace is found, the end of the stream is encountered, or str.max_size() is reached. If is.width() is non-zero, that is the limit on the number of characters stored into str. Any previous contents of str are erased. Definition at line 1139 of file istream.tcc.

References basic_string::append(), basic_string::erase(), ios_base::iostate, basic_string::max_size(), std::operator>>(), and std::streamsize.

Referenced by std::operator>>().

void swap basic_string< CharT, Traits, Alloc > &  __lhs,
basic_string< CharT, Traits, Alloc > &  __rhs
[inline]
 

Swap contents of two strings.

Parameters:
lhs First string.
rhs Second string.
Exchanges the contents of lhs and rhs in constant time. Definition at line 2269 of file basic_string.h.

Referenced by vector< Block_pair, BPVec_allocator_type >::swap(), set< Key, Compare, Allocator >::swap(), multiset< Key, Compare, Allocator >::swap(), multimap< Key, Type, Compare, Allocator >::swap(), map< Key, Type, Compare, Allocator >::swap(), std::swap(), list::swap(), and deque::swap().


Generated on Sun Sep 12 15:50:01 2004 for libstdc++ source by doxygen 1.3.8