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.

Go to the source code of this file.

Namespaces

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 1256 of file istream.tcc.

References std::getline().

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 1196 of file istream.tcc.

Referenced by std::getline().

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 2175 of file basic_string.h.

References basic_string::compare().

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 2163 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 2151 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 2096 of file basic_string.h.

References basic_string::append().

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 2080 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 681 of file basic_string.tcc.

References basic_string::append(), basic_string::reserve(), and 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 665 of file basic_string.tcc.

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

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 2043 of file basic_string.h.

References basic_string::append().

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 2212 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 2200 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 if string precedes string.

Parameters:
lhs First string.
rhs Second string.
Returns:
True if lhs precedes rhs. False otherwise.

Definition at line 2188 of file basic_string.h.

References basic_string::compare().

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 648 of file ostream.tcc.

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 2286 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 2274 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 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 2262 of file basic_string.h.

References basic_string::compare().

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 2138 of file basic_string.h.

References basic_string::compare().

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 2126 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 2114 of file basic_string.h.

References basic_string::compare().

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 2249 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 2237 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 if string follows string.

Parameters:
lhs First string.
rhs Second string.
Returns:
True if lhs follows rhs. False otherwise.

Definition at line 2225 of file basic_string.h.

References basic_string::compare().

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 2323 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 2311 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 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 2299 of file basic_string.h.

References basic_string::compare().

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 1130 of file istream.tcc.

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 2336 of file basic_string.h.

References basic_string::swap().

Referenced by vector< _Node *, _Nodeptr_Alloc >::swap(), list::swap(), and deque::swap().


Generated on Sat Apr 2 13:54:44 2005 for libstdc++ source by  doxygen 1.4.0