LLStringBase< T > Class Template Reference

#include <llstring.h>

Inheritance diagram for LLStringBase< T >:

Inheritance graph
[legend]
Collaboration diagram for LLStringBase< T >:

Collaboration graph
[legend]

List of all members.

Public Types

typedef std::basic_string< T >
::size_type 
size_type
typedef std::map< std::string,
std::string > 
format_map_t

Public Member Functions

 LLStringBase ()
 LLStringBase (const LLStringBase &s)
 LLStringBase (const std::basic_string< T > &s)
 LLStringBase (const std::basic_string< T > &s, size_type pos, size_type n=std::basic_string< T >::npos)
 LLStringBase (size_type count, const T &c)
 LLStringBase (const T *s)
 LLStringBase (const T *s, size_type n)
 LLStringBase (const T *s, size_type pos, size_type n)
bool operator== (const T *_Right) const

Static Public Member Functions

static S32 format (std::basic_string< T > &s, const format_map_t &fmt_map)
static BOOL isValidIndex (const std::basic_string< T > &string, size_type i)
static void trimHead (std::basic_string< T > &string)
static void trimTail (std::basic_string< T > &string)
static void trim (std::basic_string< T > &string)
static void truncate (std::basic_string< T > &string, size_type count)
static void toUpper (std::basic_string< T > &string)
static void toLower (std::basic_string< T > &string)
static BOOL isHead (const std::basic_string< T > &string, const T *s)
static void addCRLF (std::basic_string< T > &string)
static void removeCRLF (std::basic_string< T > &string)
static void replaceTabsWithSpaces (std::basic_string< T > &string, size_type spaces_per_tab)
static void replaceNonstandardASCII (std::basic_string< T > &string, T replacement)
static void replaceChar (std::basic_string< T > &string, T target, T replacement)
static BOOL containsNonprintable (const std::basic_string< T > &string)
static void stripNonprintable (std::basic_string< T > &string)
static void _makeASCII (std::basic_string< T > &string)
 Unsafe way to make ascii characters. You should probably only call this when interacting with the host operating system. The 1 byte LLString does not work correctly. The 2 and 4 byte LLString probably work, so LLWString::_makeASCII should work.
static BOOL convertToBOOL (const std::basic_string< T > &string, BOOL &value)
static BOOL convertToU8 (const std::basic_string< T > &string, U8 &value)
static BOOL convertToS8 (const std::basic_string< T > &string, S8 &value)
static BOOL convertToS16 (const std::basic_string< T > &string, S16 &value)
static BOOL convertToU16 (const std::basic_string< T > &string, U16 &value)
static BOOL convertToU32 (const std::basic_string< T > &string, U32 &value)
static BOOL convertToS32 (const std::basic_string< T > &string, S32 &value)
static BOOL convertToF32 (const std::basic_string< T > &string, F32 &value)
static BOOL convertToF64 (const std::basic_string< T > &string, F64 &value)
static S32 compareStrings (const T *lhs, const T *rhs)
static S32 compareInsensitive (const T *lhs, const T *rhs)
static S32 compareDict (const std::basic_string< T > &a, const std::basic_string< T > &b)
static S32 compareDictInsensitive (const std::basic_string< T > &a, const std::basic_string< T > &b)
static BOOL precedesDict (const std::basic_string< T > &a, const std::basic_string< T > &b)
static void copy (T *dst, const T *src, size_type dst_size)
static void copyInto (std::basic_string< T > &dst, const std::basic_string< T > &src, size_type offset)

Static Public Attributes

static LLStringBase null


Detailed Description

template<class T>
class LLStringBase< T >

Definition at line 178 of file llstring.h.


Member Typedef Documentation

template<class T>
typedef std::basic_string<T>::size_type LLStringBase< T >::size_type

Definition at line 181 of file llstring.h.

template<class T>
typedef std::map<std::string, std::string> LLStringBase< T >::format_map_t

Definition at line 237 of file llstring.h.


Constructor & Destructor Documentation

template<class T>
LLStringBase< T >::LLStringBase (  )  [inline]

Definition at line 189 of file llstring.h.

template<class T>
LLStringBase< T >::LLStringBase ( const LLStringBase< T > &  s  )  [inline]

Definition at line 190 of file llstring.h.

template<class T>
LLStringBase< T >::LLStringBase ( const std::basic_string< T > &  s  )  [inline]

Definition at line 191 of file llstring.h.

template<class T>
LLStringBase< T >::LLStringBase ( const std::basic_string< T > &  s,
size_type  pos,
size_type  n = std::basic_string<T>::npos 
) [inline]

Definition at line 192 of file llstring.h.

template<class T>
LLStringBase< T >::LLStringBase ( size_type  count,
const T &  c 
) [inline]

Definition at line 194 of file llstring.h.

template<class T>
LLStringBase< T >::LLStringBase ( const T *  s  )  [inline]

Definition at line 765 of file llstring.h.

template<class T>
LLStringBase< T >::LLStringBase ( const T *  s,
size_type  n 
) [inline]

Definition at line 771 of file llstring.h.

template<class T>
LLStringBase< T >::LLStringBase ( const T *  s,
size_type  pos,
size_type  n 
) [inline]

Definition at line 778 of file llstring.h.


Member Function Documentation

template<class T>
bool LLStringBase< T >::operator== ( const T *  _Right  )  const [inline]

Definition at line 229 of file llstring.h.

template<class T>
S32 LLStringBase< T >::format ( std::basic_string< T > &  s,
const format_map_t fmt_map 
) [inline, static]

Definition at line 590 of file llstring.h.

References n, and S32.

template<class T>
static BOOL LLStringBase< T >::isValidIndex ( const std::basic_string< T > &  string,
size_type  i 
) [inline, static]

Definition at line 240 of file llstring.h.

template<class T>
void LLStringBase< T >::trimHead ( std::basic_string< T > &  string  )  [inline, static]

Definition at line 892 of file llstring.h.

References i, and LLStringOps::isSpace().

Referenced by LLChatBar::onInputEditorKeystroke(), and LLStringBase< char >::trim().

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T>
void LLStringBase< T >::trimTail ( std::basic_string< T > &  string  )  [inline, static]

Definition at line 907 of file llstring.h.

References i, and LLStringOps::isSpace().

Referenced by LLStringBase< char >::trim().

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T>
static void LLStringBase< T >::trim ( std::basic_string< T > &  string  )  [inline, static]

template<class T>
void LLStringBase< T >::truncate ( std::basic_string< T > &  string,
size_type  count 
) [inline, static]

Definition at line 1341 of file llstring.h.

Referenced by LLTextEditor::LLTextCmdAddChar::execute(), LLTextEditor::LLTextCmdInsert::execute(), and LLUIString::truncate().

Here is the caller graph for this function:

template<class T>
void LLStringBase< T >::toUpper ( std::basic_string< T > &  string  )  [inline, static]

Definition at line 864 of file llstring.h.

References LLStringOps::toUpper().

Referenced by LLStringBase< T >::compareInsensitive().

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T>
void LLStringBase< T >::toLower ( std::basic_string< T > &  string  )  [inline, static]

Definition at line 878 of file llstring.h.

References LLStringOps::toLower().

Referenced by LLTextEditor::replaceText(), LLTextEditor::selectNext(), and utf8str_tolower().

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T>
BOOL LLStringBase< T >::isHead ( const std::basic_string< T > &  string,
const T *  s 
) [inline, static]

Definition at line 1144 of file llstring.h.

References FALSE.

template<class T>
void LLStringBase< T >::addCRLF ( std::basic_string< T > &  string  )  [inline, static]

Definition at line 926 of file llstring.h.

References i, and j.

template<class T>
void LLStringBase< T >::removeCRLF ( std::basic_string< T > &  string  )  [inline, static]

Definition at line 967 of file llstring.h.

References i.

template<class T>
void LLStringBase< T >::replaceTabsWithSpaces ( std::basic_string< T > &  string,
size_type  spaces_per_tab 
) [inline, static]

Definition at line 1021 of file llstring.h.

References i, and j.

Referenced by LLPrefsIMImpl::apply(), LLTextEditor::paste(), and LLLineEditor::paste().

Here is the caller graph for this function:

template<class T>
void LLStringBase< T >::replaceNonstandardASCII ( std::basic_string< T > &  string,
replacement 
) [inline, static]

Definition at line 1001 of file llstring.h.

References i.

template<class T>
void LLStringBase< T >::replaceChar ( std::basic_string< T > &  string,
target,
replacement 
) [inline, static]

Definition at line 988 of file llstring.h.

Referenced by LLPrefsIMImpl::apply(), LLLineEditor::paste(), LLPrefsIMImpl::setPersonalInfo(), and utf8str_substChar().

Here is the caller graph for this function:

template<class T>
BOOL LLStringBase< T >::containsNonprintable ( const std::basic_string< T > &  string  )  [inline, static]

Definition at line 1045 of file llstring.h.

References FALSE, i, and TRUE.

template<class T>
void LLStringBase< T >::stripNonprintable ( std::basic_string< T > &  string  )  [inline, static]

Definition at line 1062 of file llstring.h.

References i, j, and NULL.

template<class T>
void LLStringBase< T >::_makeASCII ( std::basic_string< T > &  string  )  [inline, static]

Unsafe way to make ascii characters. You should probably only call this when interacting with the host operating system. The 1 byte LLString does not work correctly. The 2 and 4 byte LLString probably work, so LLWString::_makeASCII should work.

Definition at line 1093 of file llstring.h.

References i, and LL_UNKNOWN_CHAR.

Referenced by utf8str_makeASCII().

Here is the caller graph for this function:

template<class T>
BOOL LLStringBase< T >::convertToBOOL ( const std::basic_string< T > &  string,
BOOL value 
) [inline, static]

Definition at line 1158 of file llstring.h.

References FALSE, LLStringBase< T >::trim(), and TRUE.

Here is the call graph for this function:

template<class T>
BOOL LLStringBase< T >::convertToU8 ( const std::basic_string< T > &  string,
U8 value 
) [inline, static]

Definition at line 1195 of file llstring.h.

References LLStringBase< T >::convertToS32(), FALSE, S32, TRUE, U8_MAX, and U8_MIN.

Here is the call graph for this function:

template<class T>
BOOL LLStringBase< T >::convertToS8 ( const std::basic_string< T > &  string,
S8 value 
) [inline, static]

Definition at line 1208 of file llstring.h.

References LLStringBase< T >::convertToS32(), FALSE, S32, S8_MAX, S8_MIN, and TRUE.

Here is the call graph for this function:

template<class T>
BOOL LLStringBase< T >::convertToS16 ( const std::basic_string< T > &  string,
S16 value 
) [inline, static]

Definition at line 1221 of file llstring.h.

References LLStringBase< T >::convertToS32(), FALSE, S16_MAX, S16_MIN, S32, and TRUE.

Here is the call graph for this function:

template<class T>
BOOL LLStringBase< T >::convertToU16 ( const std::basic_string< T > &  string,
U16 value 
) [inline, static]

Definition at line 1234 of file llstring.h.

References LLStringBase< T >::convertToS32(), FALSE, S32, TRUE, U16_MAX, and U16_MIN.

Here is the call graph for this function:

template<class T>
BOOL LLStringBase< T >::convertToU32 ( const std::basic_string< T > &  string,
U32 value 
) [inline, static]

Definition at line 1247 of file llstring.h.

References FALSE, LLStringBase< T >::trim(), and TRUE.

Here is the call graph for this function:

template<class T>
BOOL LLStringBase< T >::convertToS32 ( const std::basic_string< T > &  string,
S32 value 
) [inline, static]

Definition at line 1274 of file llstring.h.

References FALSE, S32, LLStringBase< T >::trim(), and TRUE.

Referenced by LLStringBase< T >::convertToS16(), LLStringBase< T >::convertToS8(), LLStringBase< T >::convertToU16(), and LLStringBase< T >::convertToU8().

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T>
BOOL LLStringBase< T >::convertToF32 ( const std::basic_string< T > &  string,
F32 value 
) [inline, static]

Definition at line 1301 of file llstring.h.

References LLStringBase< T >::convertToF64(), F32_MAX, FALSE, and TRUE.

Here is the call graph for this function:

template<class T>
BOOL LLStringBase< T >::convertToF64 ( const std::basic_string< T > &  string,
F64 value 
) [inline, static]

Definition at line 1314 of file llstring.h.

References FALSE, LLStringBase< T >::trim(), and TRUE.

Referenced by LLStringBase< T >::convertToF32().

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T>
S32 LLStringBase< T >::compareStrings ( const T *  lhs,
const T *  rhs 
) [inline, static]

Definition at line 616 of file llstring.h.

References LLStringOps::collate(), and S32.

Here is the call graph for this function:

template<class T>
S32 LLStringBase< T >::compareInsensitive ( const T *  lhs,
const T *  rhs 
) [inline, static]

Definition at line 642 of file llstring.h.

References LLStringOps::collate(), S32, and LLStringBase< T >::toUpper().

Referenced by utf8str_compare_insensitive().

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T>
S32 LLStringBase< T >::compareDict ( const std::basic_string< T > &  a,
const std::basic_string< T > &  b 
) [inline, static]

Definition at line 676 of file llstring.h.

References bias(), LLStringOps::isDigit(), LLStringOps::isUpper(), S32, and LLStringOps::toLower().

Here is the call graph for this function:

template<class T>
S32 LLStringBase< T >::compareDictInsensitive ( const std::basic_string< T > &  a,
const std::basic_string< T > &  b 
) [inline, static]

Definition at line 716 of file llstring.h.

References LLStringOps::isDigit(), LLStringOps::isUpper(), S32, and LLStringOps::toLower().

Here is the call graph for this function:

template<class T>
BOOL LLStringBase< T >::precedesDict ( const std::basic_string< T > &  a,
const std::basic_string< T > &  b 
) [inline, static]

Definition at line 751 of file llstring.h.

template<class T>
void LLStringBase< T >::copy ( T *  dst,
const T *  src,
size_type  dst_size 
) [inline, static]

Definition at line 1107 of file llstring.h.

References llmin().

Here is the call graph for this function:

template<class T>
void LLStringBase< T >::copyInto ( std::basic_string< T > &  dst,
const std::basic_string< T > &  src,
size_type  offset 
) [inline, static]

Definition at line 1123 of file llstring.h.


Member Data Documentation

template<class T>
LLStringBase< T > LLStringBase< T >::null [inline, static]

Definition at line 235 of file llstring.h.


The documentation for this class was generated from the following file:

Generated on Fri May 16 09:07:59 2008 for SecondLife by  doxygen 1.5.5