NCBI C++ ToolKit
Public Types | Public Member Functions | Private Attributes | List of all members
CTempStringEx Class Reference

Search Toolkit Book for CTempStringEx

#include <corelib/tempstr.hpp>

+ Inheritance diagram for CTempStringEx:
+ Collaboration diagram for CTempStringEx:

Public Types

enum  EZeroAtEnd { eNoZeroAtEnd, eHasZeroAtEnd }
 
- Public Types inherited from CTempString
typedef char value_type
 
typedef size_t size_type
 
typedef const char * const_iterator
 

Public Member Functions

 CTempStringEx (void)
 
 CTempStringEx (const char *str)
 
 CTempStringEx (const char *str, size_type len)
 
 CTempStringEx (const char *str, size_type len, EZeroAtEnd zero_at_end)
 
 CTempStringEx (const string &str)
 
 CTempStringEx (const string &str, size_type pos, size_type len)
 
 CTempStringEx (const CTempString &str)
 
 CTempStringEx (const CTempString &str, size_type pos)
 
 CTempStringEx (const CTempString &str, size_type pos, size_type len)
 
CTempStringExassign (const char *str, size_type len)
 Assign new values to the content of the a string. More...
 
CTempStringExassign (const char *str, size_type len, EZeroAtEnd zero_at_end)
 
CTempStringExassign (const CTempString &str)
 
CTempStringExassign (const CTempStringEx &str)
 
CTempStringExassign (const CTempString str, size_type pos, size_type count)
 
void clear (void)
 Clear value to an empty string. More...
 
CTempStringEx substr (size_type pos) const
 Obtain a substring from this string, beginning at a given offset. More...
 
CTempStringEx substr (size_type pos, size_type len) const
 Obtain a substring from this string, beginning at a given offset and extending a specified length. More...
 
bool HasZeroAtEnd (void) const
 
- Public Member Functions inherited from CTempString
 CTempString (void)
 
 CTempString (const char *str)
 
 CTempString (const char *str, size_type len)
 
 CTempString (const char *str, size_type pos, size_type len)
 Use CTempString(const char* str + pos, size_type len - pos) instead. More...
 
 CTempString (const string &str)
 
 CTempString (const string &str, size_type len)
 Use CTempString(const string& str, 0, size_type len) instead. More...
 
 CTempString (const string &str, size_type pos, size_type len)
 
 CTempString (const CTempString &str)
 
 CTempString (const CTempString &str, size_type pos)
 
 CTempString (const CTempString &str, size_type pos, size_type len)
 
void Copy (string &dst, size_type pos, size_type len) const
 Copy a substring into a string Somewhat similar to basic_string::assign() More...
 
 operator string (void) const
 
CTempStringassign (const char *src_str, size_type len)
 Assign new values to the content of the a string. More...
 
CTempStringassign (const CTempString src_str)
 
CTempStringassign (const CTempString src_str, size_type pos, size_type len)
 
CTempStringoperator= (const CTempString str)
 
const_iterator begin () const
 Return an iterator to the string's starting position. More...
 
const_iterator end () const
 Return an iterator to the string's ending position (one past the end of the represented sequence) More...
 
const char * data (void) const
 Return a pointer to the array represented. More...
 
size_type length (void) const
 Return the length of the represented array. More...
 
size_type size (void) const
 Return the length of the represented array. More...
 
bool empty (void) const
 Return true if the represented string is empty (i.e., the length is zero) More...
 
void clear (void)
 Clears the string. More...
 
void erase (size_type pos=0)
 Truncate the string at some specified position Note: basic_string<> supports additional erase() options that we do not provide here. More...
 
size_type find (const CTempString match, size_type pos=0) const
 Find the first instance of the entire matching string within the current string, beginning at an optional offset. More...
 
size_type find (char match, size_type pos=0) const
 Find the first instance of a given character string within the current string in a forward direction, beginning at an optional offset. More...
 
size_type rfind (const CTempString match, size_type pos=npos) const
 Find the first instance of the entire matching string within the current string in a backward direction, beginning at an optional offset. More...
 
size_type rfind (char match, size_type pos=npos) const
 Find the last instance of a given character string within the current string, beginning at an optional offset. More...
 
size_type find_first_of (const CTempString match, size_type pos=0) const
 Find the first occurrence of any character in the matching string within the current string, beginning at an optional offset. More...
 
size_type find_first_not_of (const CTempString match, size_type pos=0) const
 Find the first occurrence of any character not in the matching string within the current string, beginning at an optional offset. More...
 
size_type find_last_of (const CTempString match, size_type pos=npos) const
 Find the last occurrence of any character in the matching string within the current string, beginning at an optional offset. More...
 
size_type find_last_not_of (const CTempString match, size_type pos=npos) const
 Find the last occurrence of any character not in the matching string within the current string, beginning at an optional offset. More...
 
CTempString substr (size_type pos) const
 Obtain a substring from this string, beginning at a given offset. More...
 
CTempString substr (size_type pos, size_type len) const
 Obtain a substring from this string, beginning at a given offset and extending a specified length. More...
 
char operator[] (size_type pos) const
 Index into the current string and provide its character in a read- only fashion. More...
 
int compare (const CTempString str) const
 Compare the current string with a given string. More...
 
bool operator== (const CTempString str) const
 
bool operator!= (const CTempString str) const
 
bool operator< (const CTempString str) const
 
bool operator> (const CTempString str) const
 

Private Attributes

EZeroAtEnd m_ZeroAtEnd
 

Additional Inherited Members

- Static Public Attributes inherited from CTempString
static const size_type npos = static_cast<size_type>(-1)
 

Detailed Description

Definition at line 883 of file tempstr.hpp.

Constructor & Destructor Documentation

CTempStringEx::CTempStringEx ( void  )
inline

Definition at line 890 of file tempstr.hpp.

Referenced by substr().

CTempStringEx::CTempStringEx ( const char *  str)
inline

Definition at line 894 of file tempstr.hpp.

CTempStringEx::CTempStringEx ( const char *  str,
size_type  len 
)
inline

Definition at line 899 of file tempstr.hpp.

CTempStringEx::CTempStringEx ( const char *  str,
size_type  len,
EZeroAtEnd  zero_at_end 
)
inline

Definition at line 904 of file tempstr.hpp.

CTempStringEx::CTempStringEx ( const string str)
inline

Definition at line 909 of file tempstr.hpp.

CTempStringEx::CTempStringEx ( const string str,
size_type  pos,
size_type  len 
)
inline

Definition at line 914 of file tempstr.hpp.

CTempStringEx::CTempStringEx ( const CTempString str)
inline

Definition at line 919 of file tempstr.hpp.

CTempStringEx::CTempStringEx ( const CTempString str,
size_type  pos 
)
inline

Definition at line 924 of file tempstr.hpp.

CTempStringEx::CTempStringEx ( const CTempString str,
size_type  pos,
size_type  len 
)
inline

Definition at line 929 of file tempstr.hpp.

Member Function Documentation

CTempStringEx& CTempStringEx::assign ( const char *  str,
size_type  len 
)
inline

Assign new values to the content of the a string.

Definition at line 936 of file tempstr.hpp.

References CTempString::assign(), eNoZeroAtEnd, and m_ZeroAtEnd.

Referenced by CTempStringList::Join(), CWigBufferedLineReader::operator++(), CStrTokenizeBase::SetDelim(), and CStrTokenizeBase::x_ExtendInternalDelim().

CTempStringEx& CTempStringEx::assign ( const char *  str,
size_type  len,
EZeroAtEnd  zero_at_end 
)
inline

Definition at line 942 of file tempstr.hpp.

References CTempString::assign(), and m_ZeroAtEnd.

CTempStringEx& CTempStringEx::assign ( const CTempString str)
inline

Definition at line 949 of file tempstr.hpp.

References CTempString::assign(), eNoZeroAtEnd, and m_ZeroAtEnd.

CTempStringEx& CTempStringEx::assign ( const CTempStringEx str)
inline

Definition at line 955 of file tempstr.hpp.

References str().

CTempStringEx& CTempStringEx::assign ( const CTempString  str,
size_type  pos,
size_type  count 
)
inline

Definition at line 959 of file tempstr.hpp.

References CTempString::assign(), eNoZeroAtEnd, and m_ZeroAtEnd.

void CTempStringEx::clear ( void  )
inline

Clear value to an empty string.

Definition at line 969 of file tempstr.hpp.

References CTempString::clear(), eHasZeroAtEnd, and m_ZeroAtEnd.

Referenced by CWig2tableApplication::x_TryGetDouble(), and CWig2tableApplication::x_TryGetDoubleSimple().

bool CTempStringEx::HasZeroAtEnd ( void  ) const
inline
CTempStringEx CTempStringEx::substr ( size_type  pos) const
inline
CTempStringEx CTempStringEx::substr ( size_type  pos,
size_type  len 
) const
inline

Obtain a substring from this string, beginning at a given offset and extending a specified length.

Definition at line 987 of file tempstr.hpp.

References CTempStringEx(), CTempString::data(), eNoZeroAtEnd, m_ZeroAtEnd, max(), and CTempString::size().

Member Data Documentation

EZeroAtEnd CTempStringEx::m_ZeroAtEnd
private

Definition at line 1008 of file tempstr.hpp.

Referenced by assign(), clear(), HasZeroAtEnd(), and substr().


The documentation for this class was generated from the following file:
Modified on Wed Aug 16 05:52:08 2017 by modify_doxy.py rev. 533848