# Frost::s_str_t< T > Class Template Reference

Base type : string. More...

`#include <frost_utils_str.h>`

List of all members.

## Public Types

typedef T | character
typedef TypeTraits< T >::FrostType | frost_character
typedef std::basic_string< T > | string
typedef string::iterator | iterator
typedef string::const_iterator | const_iterator
typedef s_range< iterator > | range
typedef s_range< const_iterator > | const_range

## Public Member Functions

| s_str_t ()
| Constructor.
| s_str_t (const s_str_t &s)
| Copy constructor.
| s_str_t (const string &s)
| Constructor.
| s_str_t (const character *s)
| Constructor.
| s_str_t (character *s)
| Constructor.
| s_str_t (const character &c)
| Constructor.
| s_str_t (const frost_character &c)
| Constructor.
| s_str_t (const s_str_t &s, const s_uint_t< default_uint > &uiNbr)
| Creates "uiNbr" copies of the provided string.
| s_str_t (const character &c, const s_uint_t< default_uint > &uiNbr)
| Creates "uiNbr" copies of the provided character.
| s_str_t (const frost_character &c, const s_uint_t< default_uint > &uiNbr)
| Creates "uiNbr" copies of the provided character.
template<class N >
| s_str_t (const N &mValue, typename StringConverter< character, N >::IsDefined *mEnableIf=0)
| Generic constructor (only supports string -> string conversion).
void | CapitalStart (const s_bool &bCapitalStart)
| Changes the case of the first character.
void | Clear ()
| Removes the content of the string.
s_ctnr< s_str_t > | Cut (const s_str_t &sDelim) const
| Cuts this string everytime the delineator is found.
s_ctnr< s_str_t > | Cut (const s_str_t &sDelim, const s_uint_t< default_uint > &uiMaxCut) const
| Cuts this string everytime the delineator is found.
s_ctnr< s_str_t > | CutEach (const s_str_t &sDelim) const
| Cuts this string everytime the delineator is found.
s_ctnr< s_str_t > | CutEach (const s_str_t &sDelim, const s_uint_t< default_uint > &uiMaxCut) const
| Cuts this string everytime the delineator is found.
s_ctnr< s_str_t > | Cut (const s_ctnr< character > &lDelims) const
| Cuts this string everytime a delineator is found.
s_uint_t< default_uint > | CountOccurences (const s_str_t &sPattern) const
| Counts the number of time a certain pattern is found on the string.
void | Erase (const s_uint_t< default_uint > &uiStart, const s_uint_t< default_uint > &uiNbr)
| Removes a certain number of character from a given position.
void | Erase (const s_uint_t< default_uint > &uiPos)
| Removes a character.
iterator | Erase (iterator iter)
| Removes a character.
void | EraseFromEnd (const s_uint_t< default_uint > &uiNbr)
| Removes a certain number of character from the end of the string.
void | EraseFromStart (const s_uint_t< default_uint > &uiNbr)
| Removes a certain number of character from the beginning of the string.
void | EraseRange (const s_uint_t< default_uint > &uiStart, const s_uint_t< default_uint > &uiEnd)
| Removes all characters between the provided positions.
iterator | EraseRange (iterator iterStart, iterator iterEnd)
| Removes all characters between the provided positions.
iterator | EraseRange (range mRange)
| Removes all characters between the provided positions.
s_str_t | Extract (const s_uint_t< default_uint > &uiStart, const s_uint_t< default_uint > &uiNbr=s_uint_t< default_uint >::INF) const
| Returns a certain number of character from a given position.
s_str_t | ExtractRange (const s_uint_t< default_uint > &uiStart, const s_uint_t< default_uint > &uiEnd) const
| Returns all characters between the provided positions.
iterator | Get (const s_str_t &sValue)
| Returns the position of the pattern in the string.
iterator | Get (const s_str_t &sValue, const s_uint_t< default_uint > &uiStart)
| Returns the position of the pattern in the string.
const_iterator | Get (const s_str_t &sValue) const
| Returns the position of the pattern in the string.
const_iterator | Get (const s_str_t &sValue, const s_uint_t< default_uint > &uiStart) const
| Returns the position of the pattern in the string.
s_uint_t< default_uint > | FindPos (const s_str_t &sValue) const
| Returns the position of the pattern in the string.
s_uint_t< default_uint > | FindPos (const s_str_t &sValue, const s_uint_t< default_uint > &uiStart) const
| Returns the position of the pattern in the string.
s_ctnr< s_uint_t< default_uint > > | FindAllPos (const s_str_t &sPattern)
| Returns all positions of the pattern in the string.
s_ctnr< s_uint_t< default_uint > > | FindAllPos (const s_str_t &sPattern, const s_uint_t< default_uint > &uiStart)
| Returns all positions of the pattern in the string.
s_bool | Find (const s_str_t &sValue) const
| Returns true is the pattern is found in the string.
s_bool | Find (const s_str_t &sValue, const s_uint_t< default_uint > &uiStart) const
| Returns true is the pattern is found in the string.
const string & | Get () const
| Returns a const reference to the string.
string & | Get ()
| Returns a reference to the string.
const T * | c_str () const
| Returns a C-style string.
s_bool | IsEmpty (const s_bool &bIgnoreSpaces=false) const
| Checks if the string is empty.
s_bool | IsNumber () const
| Checks if the string is a number.
s_bool | IsBoolean () const
| Checks if the string is a bool.
s_uint_t< default_uint > | GetLength () const
| Returns the number of character in the string.
s_uint_t< default_uint > | GetSize () const
| Returns the number of character in ths string.
void | ToLower ()
| Makes this string completely lower case.
void | ToUpper ()
| Makes this string completely UPPER CASE.
s_uint_t< default_uint > | Trim (const character &cPattern)
| Removes the surrounding characters matching the provided pattern.
s_uint_t< default_uint > | Replace (const s_str_t &sPattern, const s_str_t &sReplacement)
| Replaces a pattern by another string.
void | PushBack (const character &cChar)
| Adds a new character at the end of the string.
void | PushBack (const s_str_t &sValue)
| Adds a new string at the end of this string.
void | PopBack ()
| Removes the last character.
T & | Back ()
| Returns a reference to the last character.
const T & | Back () const
| Returns a const reference to the last character.
void | PushFront (const character &cChar)
| Adds a new character at the beginning of the string.
void | PushFront (const s_str_t &sValue)
| Adds a new string at the beginning of this string.
void | PopFront ()
| Removes the first character.
T & | Front ()
| Returns a reference to the first character.
const T & | Front () const
| Returns a const reference to the first character.
void | Insert (const character &cChar, const s_uint_t< default_uint > &uiPos)
| Adds a new character somewhere in the string.
iterator | Insert (const character &cChar, iterator iter)
| Adds a new character somewhere in the string.
void | Insert (const s_str_t &sValue, const s_uint_t< default_uint > &uiPos)
| Adds another string somewhere in this string.
iterator | Insert (const s_str_t &sValue, iterator iter)
| Adds another string somewhere in this string.
void | Reverse ()
| Inverts the order of the letters in the string.
s_bool | StartsWith (const s_str_t &sPattern) const
| Checks if this string starts with the provided pattern.
s_bool | EndsWith (const s_str_t &sPattern) const
| Checks if this string ends with the provided pattern.
iterator | begin ()
const_iterator | begin () const
iterator | end ()
const_iterator | end () const
iterator | Begin ()
const_iterator | Begin () const
iterator | End ()
const_iterator | End () const
T & | operator[] (const s_uint_t< default_uint > &uiIndex)
const T & | operator[] (const s_uint_t< default_uint > &uiIndex) const
T & | operator[] (const default_uint &uiIndex)
const T & | operator[] (const default_uint &uiIndex) const
template<class N >
s_str_t | operator+ (const N &mValue) const
template<class N >
void | operator+= (const N &mValue)
template<class N >
s_str_t & | operator<< (const N &mValue)
s_bool | operator== (const s_str_t &mValue) const
s_bool | operator!= (const s_str_t &mValue) const
s_bool | operator< (const s_str_t &mValue) const
s_bool | operator> (const s_str_t &mValue) const
s_bool | operator<= (const s_str_t &mValue) const
s_bool | operator>= (const s_str_t &mValue) const

## Static Public Member Functions

static s_str_t | ToLower (const s_str_t &sValue)
| Makes the provided string lower case.
static s_str_t | ToUpper (const s_str_t &sValue)
| Makes the provided string UPPER CASE.
static s_str_t | Reverse (const s_str_t &sValue)
| Reverses the provided string.
template<class N >
static s_str_t | Convert (const N &mValue)
| Generic conversion function.
template<class N , class M >
static s_str_t | Convert (const N &mValue, const M &mParam1)
| Generic conversion function.
template<class N , class M , class O >
static s_str_t | Convert (const N &mValue, const M &mParam1, const O &mParam2)
| Generic conversion function.
static s_bool | IsNumber (const character &cValue)
| Checks if the provided character is a number.
static s_bool | IsNumber (const frost_character &cValue)
| Checks if the provided character is a number.
static s_bool | IsAlphaNumeric (const character &cValue)
| Checks if the provided character is a letter or a number.
static s_bool | IsAlphaNumeric (const frost_character &cValue)
| Checks if the provided character is a letter or a number.

## Static Public Attributes

static const s_str_t | EMPTY = ""

## Private Attributes

string | sValue_

## Detailed Description

### template<class T>
class Frost::s_str_t< T >

Base type : string.

Frost's base types are made to allow simpler manipulation of numbers, booleans and strings. They simplify conversions (mostly to string), allow easy access to math/string functions and implements new functions that are not present in the standard libraries.
Note : Most of Frost's base types are slower than C++ base types. The difference is negligible for small operations, but if you need to do a lot of calculations it can bloat your performances. Use prebuilt types in this case.
Note 2 : This class is almost as efficient as the standard std::string.

Definition at line 22 of file frost_utils_str.h.

## Member Typedef Documentation

template<class T>

typedef T Frost::s_str_t< T >::character

Definition at line 26 of file frost_utils_str.h.

template<class T>

typedef string::const_iterator Frost::s_str_t< T >::const_iterator

Definition at line 30 of file frost_utils_str.h.

template<class T>

typedef s_range<const_iterator> Frost::s_str_t< T >::const_range

Definition at line 32 of file frost_utils_str.h.

template<class T>

typedef TypeTraits<T>::FrostType Frost::s_str_t< T >::frost_character

Definition at line 27 of file frost_utils_str.h.

template<class T>

typedef string::iterator Frost::s_str_t< T >::iterator

Definition at line 29 of file frost_utils_str.h.

template<class T>

typedef s_range<iterator> Frost::s_str_t< T >::range

Definition at line 31 of file frost_utils_str.h.

template<class T>

typedef std::basic_string<T> Frost::s_str_t< T >::string

Definition at line 28 of file frost_utils_str.h.

## Constructor & Destructor Documentation

template<class T >

Frost::s_str_t< T >::s_str_t | ( |  | ) | `[inline]`

Constructor.

Definition at line 11 of file frost_utils_str_impl.cpp.

template<class T >

Frost::s_str_t< T >::s_str_t | ( | const s_str_t< T > & | s | ) | `[inline]`

Copy constructor.

Parameters:

  | s | The string to copy

Definition at line 16 of file frost_utils_str_impl.cpp.

template<class T >

Frost::s_str_t< T >::s_str_t | ( | const string & | s | ) | `[inline]`

Constructor.

Parameters:

  | s | The string to copy

Definition at line 22 of file frost_utils_str_impl.cpp.

template<class T >

Frost::s_str_t< T >::s_str_t | ( | const character * | s | ) | `[inline]`

Constructor.

Parameters:

  | s | The character array to copy

Definition at line 28 of file frost_utils_str_impl.cpp.

template<class T >

Frost::s_str_t< T >::s_str_t | ( | character * | s | ) | `[inline]`

Constructor.

Parameters:

  | s | The character array to copy

Definition at line 34 of file frost_utils_str_impl.cpp.

template<class T >

Frost::s_str_t< T >::s_str_t | ( | const character & | c | ) | `[inline, explicit]`

Constructor.

Parameters:

  | c | The character to copy

Definition at line 40 of file frost_utils_str_impl.cpp.

template<class T >

Frost::s_str_t< T >::s_str_t | ( | const frost_character & | c | ) | `[inline, explicit]`

Constructor.

Parameters:

  | c | The character to copy

Definition at line 46 of file frost_utils_str_impl.cpp.

template<class T >

Frost::s_str_t< T >::s_str_t | ( | const s_str_t< T > & | s,
|  | const s_uint_t< default_uint > & | uiNbr |
| ) |  |  | `[inline]`

Creates "uiNbr" copies of the provided string.

Parameters:

  | s | The string to copy
  | uiNbr | The number of times to copy the string

Note:
  If uiNbr equals 0, creates an empty string.

Definition at line 52 of file frost_utils_str_impl.cpp.

template<class T >

Frost::s_str_t< T >::s_str_t | ( | const character & | c,
|  | const s_uint_t< default_uint > & | uiNbr |
| ) |  |  | `[inline]`

Creates "uiNbr" copies of the provided character.

Parameters:

  | c | The character to copy
  | uiNbr | The number of times to copy the character

Note:
  If uiNbr equals 0, creates an empty string.

Definition at line 62 of file frost_utils_str_impl.cpp.

template<class T >

Frost::s_str_t< T >::s_str_t | ( | const frost_character & | c,
|  | const s_uint_t< default_uint > & | uiNbr |
| ) |  |  | `[inline]`

Creates "uiNbr" copies of the provided character.

Parameters:

  | c | The character to copy
  | uiNbr | The number of times to copy the character

Note:
  If uiNbr equals 0, creates an empty string.

Definition at line 69 of file frost_utils_str_impl.cpp.

template<class T>
template<class N >

Frost::s_str_t< T >::s_str_t | ( | const N & | mValue,
|  | typename StringConverter< character, N >::IsDefined * | mEnableIf = `0` |
| ) |  |  | `[inline]`

Generic constructor (only supports string -> string conversion).

Parameters:

  | mValue | The value to convert
  | mEnableIf | Template trick to enable this constructor for convertible types only, don't bother with it

Note:
  Calls StringConverter::Convert().

Definition at line 95 of file frost_utils_str.h.

## Member Function Documentation

template<class T >

const T & Frost::s_str_t< T >::Back | ( |  | ) | const`[inline]`

Returns a const reference to the last character.

Returns:
  A const reference to the last character

Definition at line 575 of file frost_utils_str_impl.cpp.

template<class T >

T & Frost::s_str_t< T >::Back | ( |  | ) | `[inline]`

Returns a reference to the last character.

Returns:
  A reference to the last character

Definition at line 569 of file frost_utils_str_impl.cpp.

template<class T >

s_str_t< T >::const_iterator Frost::s_str_t< T >::Begin | ( |  | ) | const`[inline]`

Definition at line 730 of file frost_utils_str_impl.cpp.

template<class T >

s_str_t< T >::iterator Frost::s_str_t< T >::Begin | ( |  | ) | `[inline]`

Definition at line 724 of file frost_utils_str_impl.cpp.

template<class T >

s_str_t< T >::const_iterator Frost::s_str_t< T >::begin | ( |  | ) | const`[inline]`

Definition at line 706 of file frost_utils_str_impl.cpp.

template<class T >

s_str_t< T >::iterator Frost::s_str_t< T >::begin | ( |  | ) | `[inline]`

Definition at line 700 of file frost_utils_str_impl.cpp.

template<class T>

const T* Frost::s_str_t< T >::c_str | ( |  | ) | const`[inline]`

Returns a C-style string.

Returns:
  A C-style string

Definition at line 306 of file frost_utils_str.h.

template<class T >

void Frost::s_str_t< T >::CapitalStart | ( | const s_bool & | bCapitalStart | ) | `[inline]`

Changes the case of the first character.

Parameters:

  | bCapitalStart | If 'true', the first character will be capitalized.

Definition at line 76 of file frost_utils_str_impl.cpp.

template<class T >

void Frost::s_str_t< T >::Clear | ( |  | ) | `[inline]`

Removes the content of the string.

Definition at line 86 of file frost_utils_str_impl.cpp.

template<class T>
template<class N , class M , class O >

static s_str_t Frost::s_str_t< T >::Convert | ( | const N & | mValue,
|  | const M & | mParam1,
|  | const O & | mParam2 |
| ) |  |  | `[inline, static]`

Generic conversion function.

Parameters:

  | mValue | The value to convert
  | mParam1 | The first parameter
  | mParam2 | The second parameter

Definition at line 535 of file frost_utils_str.h.

template<class T>
template<class N , class M >

static s_str_t Frost::s_str_t< T >::Convert | ( | const N & | mValue,
|  | const M & | mParam1 |
| ) |  |  | `[inline, static]`

Generic conversion function.

Parameters:

  | mValue | The value to convert
  | mParam1 | The first parameter

Definition at line 524 of file frost_utils_str.h.

template<class T>
template<class N >

static s_str_t Frost::s_str_t< T >::Convert | ( | const N & | mValue | ) | `[inline, static]`

Generic conversion function.

Parameters:

  | mValue | The value to convert

Note:
  Calls StringConverter::Convert().

Definition at line 514 of file frost_utils_str.h.

template<class T >

s_uint_t< default_uint > Frost::s_str_t< T >::CountOccurences | ( | const s_str_t< T > & | sPattern | ) | const`[inline]`

Counts the number of time a certain pattern is found on the string.

Parameters:

  | sPattern | The string to search for

Returns:
  The number of time this pattern is found

Definition at line 215 of file frost_utils_str_impl.cpp.

template<class T >

s_ctnr< s_str_t< T > > Frost::s_str_t< T >::Cut | ( | const s_ctnr< character > & | lDelims | ) | const`[inline]`

Cuts this string everytime a delineator is found.

Parameters:

  | lDelims | The list of delineators (single characters)

Returns:
  A vector containing the separated strings

Note:
  If no delineator is found in the string, this function returns the whole string, unchanged.
  Removes delineators from the sub-strings.
  This function groups occurences of any delineator. Unlike the other versions, this function only supports cutting by *single* characters.

Definition at line 188 of file frost_utils_str_impl.cpp.

template<class T >

s_ctnr< s_str_t< T > > Frost::s_str_t< T >::Cut | ( | const s_str_t< T > & | sDelim,
|  | const s_uint_t< default_uint > & | uiMaxCut |
| ) |  |  | const`[inline]`

Cuts this string everytime the delineator is found.

Parameters:

  | sDelim | The delineator
  | uiMaxCut | The maximum number of occurences.

Returns:
  A vector containing the separated strings

Note:
  If the delineator is not found in the string, this function returns the whole string, unchanged.
  Removes the delineator from the sub-strings.
  This function groups occurences of the delineator.

Definition at line 115 of file frost_utils_str_impl.cpp.

template<class T >

s_ctnr< s_str_t< T > > Frost::s_str_t< T >::Cut | ( | const s_str_t< T > & | sDelim | ) | const`[inline]`

Cuts this string everytime the delineator is found.

Parameters:

  | sDelim | The delineator

Returns:
  A vector containing the separated strings

Note:
  If the delineator is not found in the string, this function returns the whole string, unchanged.
  Removes the delineator from the sub-strings.
  This function groups occurences of the delineator.

Definition at line 92 of file frost_utils_str_impl.cpp.

template<class T >

s_ctnr< s_str_t< T > > Frost::s_str_t< T >::CutEach | ( | const s_str_t< T > & | sDelim,
|  | const s_uint_t< default_uint > & | uiMaxCut |
| ) |  |  | const`[inline]`

Cuts this string everytime the delineator is found.

Parameters:

  | sDelim | The delineator
  | uiMaxCut | The maximum number of occurences.

Returns:
  A vector containing the separated strings

Note:
  If the delineator is not found in the string, this function returns the whole string, unchanged.
  Removes the delineator from the sub-strings.
  This function cuts the string each time the delineator is found.

Definition at line 163 of file frost_utils_str_impl.cpp.

template<class T >

s_ctnr< s_str_t< T > > Frost::s_str_t< T >::CutEach | ( | const s_str_t< T > & | sDelim | ) | const`[inline]`

Cuts this string everytime the delineator is found.

Parameters:

  | sDelim | The delineator

Returns:
  A vector containing the separated strings

Note:
  If the delineator is not found in the string, this function returns the whole string, unchanged.
  Removes the delineator from the sub-strings.
  This function cuts the string each time the delineator is found.

Definition at line 141 of file frost_utils_str_impl.cpp.

template<class T >

s_str_t< T >::const_iterator Frost::s_str_t< T >::End | ( |  | ) | const`[inline]`

Definition at line 742 of file frost_utils_str_impl.cpp.

template<class T >

s_str_t< T >::iterator Frost::s_str_t< T >::End | ( |  | ) | `[inline]`

Definition at line 736 of file frost_utils_str_impl.cpp.

template<class T >

s_str_t< T >::const_iterator Frost::s_str_t< T >::end | ( |  | ) | const`[inline]`

Definition at line 718 of file frost_utils_str_impl.cpp.

template<class T >

s_str_t< T >::iterator Frost::s_str_t< T >::end | ( |  | ) | `[inline]`

Definition at line 712 of file frost_utils_str_impl.cpp.

template<class T >

s_bool Frost::s_str_t< T >::EndsWith | ( | const s_str_t< T > & | sPattern | ) | const`[inline]`

Checks if this string ends with the provided pattern.

Parameters:

  | sPattern | The pattern to search for

Returns:
  'true' if the pattern has been found

Definition at line 679 of file frost_utils_str_impl.cpp.

template<class T >

s_str_t< T >::iterator Frost::s_str_t< T >::Erase | ( | iterator | iter | ) | `[inline]`

Removes a character.

Parameters:

  | iter | An iterator pointing at the caracter to erase

Definition at line 249 of file frost_utils_str_impl.cpp.

template<class T >

void Frost::s_str_t< T >::Erase | ( | const s_uint_t< default_uint > & | uiPos | ) | `[inline]`

Removes a character.

Parameters:

  | uiPos | The character to erase

Definition at line 242 of file frost_utils_str_impl.cpp.

template<class T >

void Frost::s_str_t< T >::Erase | ( | const s_uint_t< default_uint > & | uiStart,
|  | const s_uint_t< default_uint > & | uiNbr |
| ) |  |  | `[inline]`

Removes a certain number of character from a given position.

Parameters:

  | uiStart | From where to start erasing
  | uiNbr | The number of character to erase

Definition at line 230 of file frost_utils_str_impl.cpp.

template<class T >

void Frost::s_str_t< T >::EraseFromEnd | ( | const s_uint_t< default_uint > & | uiNbr | ) | `[inline]`

Removes a certain number of character from the end of the string.

Parameters:

  | uiNbr | The number of character to erase

Definition at line 255 of file frost_utils_str_impl.cpp.

template<class T >

void Frost::s_str_t< T >::EraseFromStart | ( | const s_uint_t< default_uint > & | uiNbr | ) | `[inline]`

Removes a certain number of character from the beginning of the string.

Parameters:

  | uiNbr | The number of character to erase

Definition at line 264 of file frost_utils_str_impl.cpp.

template<class T >

s_str_t< T >::iterator Frost::s_str_t< T >::EraseRange | ( | range | mRange | ) | `[inline]`

Removes all characters between the provided positions.

Parameters:

  | mRange | The range to erase

Definition at line 291 of file frost_utils_str_impl.cpp.

template<class T >

s_str_t< T >::iterator Frost::s_str_t< T >::EraseRange | ( | iterator | iterStart,
|  | iterator | iterEnd |
| ) |  |  | `[inline]`

Removes all characters between the provided positions.

Parameters:

  | iterStart | From where to start erasing
  | iterEnd | From where to end (exclusive)

Definition at line 285 of file frost_utils_str_impl.cpp.

template<class T >

void Frost::s_str_t< T >::EraseRange | ( | const s_uint_t< default_uint > & | uiStart,
|  | const s_uint_t< default_uint > & | uiEnd |
| ) |  |  | `[inline]`

Removes all characters between the provided positions.

Parameters:

  | uiStart | From where to start erasing
  | uiEnd | From where to end (exclusive)

Definition at line 273 of file frost_utils_str_impl.cpp.

template<class T >

s_str_t< T > Frost::s_str_t< T >::Extract | ( | const s_uint_t< default_uint > & | uiStart,
|  | const s_uint_t< default_uint > & | uiNbr = `s_uint_t<default_uint>::INF` |
| ) |  |  | const`[inline]`

Returns a certain number of character from a given position.

Parameters:

  | uiStart | From where to start reading
  | uiNbr | The number of character to read

Returns:
  The resulting string

Definition at line 297 of file frost_utils_str_impl.cpp.

template<class T >

s_str_t< T > Frost::s_str_t< T >::ExtractRange | ( | const s_uint_t< default_uint > & | uiStart,
|  | const s_uint_t< default_uint > & | uiEnd |
| ) |  |  | const`[inline]`

Returns all characters between the provided positions.

Parameters:

  | uiStart | From where to start reading
  | uiEnd | From where to end (exclusive)

Returns:
  The resulting string

Definition at line 306 of file frost_utils_str_impl.cpp.

template<class T >

s_bool Frost::s_str_t< T >::Find | ( | const s_str_t< T > & | sValue,
|  | const s_uint_t< default_uint > & | uiStart |
| ) |  |  | const`[inline]`

Returns true is the pattern is found in the string.

Parameters:

  | sValue | The string to search for
  | uiStart | From where to start searching

Returns:
  'true' if the pattern is found

Definition at line 426 of file frost_utils_str_impl.cpp.

template<class T >

s_bool Frost::s_str_t< T >::Find | ( | const s_str_t< T > & | sValue | ) | const`[inline]`

Returns true is the pattern is found in the string.

Parameters:

  | sValue | The string to search for

Returns:
  'true' if the pattern is found

Definition at line 416 of file frost_utils_str_impl.cpp.

template<class T >

s_ctnr< s_uint_t< default_uint > > Frost::s_str_t< T >::FindAllPos | ( | const s_str_t< T > & | sPattern,
|  | const s_uint_t< default_uint > & | uiStart |
| ) |  |  | `[inline]`

Returns all positions of the pattern in the string.

Parameters:

  | sPattern | The string to search for
  | uiStart | From where to start searching

Returns:
  All positions of the pattern (empty if not found)

Definition at line 398 of file frost_utils_str_impl.cpp.

template<class T >

s_ctnr< s_uint_t< default_uint > > Frost::s_str_t< T >::FindAllPos | ( | const s_str_t< T > & | sPattern | ) | `[inline]`

Returns all positions of the pattern in the string.

Parameters:

  | sPattern | The string to search for

Returns:
  All positions of the pattern (empty if not found)

Definition at line 384 of file frost_utils_str_impl.cpp.

template<class T >

s_uint_t< default_uint > Frost::s_str_t< T >::FindPos | ( | const s_str_t< T > & | sValue,
|  | const s_uint_t< default_uint > & | uiStart |
| ) |  |  | const`[inline]`

Returns the position of the pattern in the string.

Parameters:

  | sValue | The string to search for
  | uiStart | From where to start searching

Returns:
  The position of the pattern (NaN if not found)

Definition at line 371 of file frost_utils_str_impl.cpp.

template<class T >

s_uint_t< default_uint > Frost::s_str_t< T >::FindPos | ( | const s_str_t< T > & | sValue | ) | const`[inline]`

Returns the position of the pattern in the string.

Parameters:

  | sValue | The string to search for

Returns:
  The position of the pattern (NaN if not found)

Definition at line 361 of file frost_utils_str_impl.cpp.

template<class T >

const T & Frost::s_str_t< T >::Front | ( |  | ) | const`[inline]`

Returns a const reference to the first character.

Returns:
  A const reference to the first character

Definition at line 606 of file frost_utils_str_impl.cpp.

template<class T >

T & Frost::s_str_t< T >::Front | ( |  | ) | `[inline]`

Returns a reference to the first character.

Returns:
  A reference to the first character

Definition at line 600 of file frost_utils_str_impl.cpp.

template<class T>

string& Frost::s_str_t< T >::Get | ( |  | ) | `[inline]`

Returns a reference to the string.

Returns:
  A reference to the string

Definition at line 301 of file frost_utils_str.h.

template<class T>

const string& Frost::s_str_t< T >::Get | ( |  | ) | const`[inline]`

Returns a const reference to the string.

Returns:
  A const reference to the string

Definition at line 296 of file frost_utils_str.h.

template<class T >

s_str_t< T >::const_iterator Frost::s_str_t< T >::Get | ( | const s_str_t< T > & | sValue,
|  | const s_uint_t< default_uint > & | uiStart |
| ) |  |  | const`[inline]`

Returns the position of the pattern in the string.

Parameters:

  | sValue | The string to search for
  | uiStart | From where to start searching

Returns:
  The position of the pattern (NaN if not found)

Definition at line 348 of file frost_utils_str_impl.cpp.

template<class T >

s_str_t< T >::const_iterator Frost::s_str_t< T >::Get | ( | const s_str_t< T > & | sValue | ) | const`[inline]`

Returns the position of the pattern in the string.

Parameters:

  | sValue | The string to search for

Returns:
  The position of the pattern (NaN if not found)

Definition at line 338 of file frost_utils_str_impl.cpp.

template<class T >

s_str_t< T >::iterator Frost::s_str_t< T >::Get | ( | const s_str_t< T > & | sValue,
|  | const s_uint_t< default_uint > & | uiStart |
| ) |  |  | `[inline]`

Returns the position of the pattern in the string.

Parameters:

  | sValue | The string to search for
  | uiStart | From where to start searching

Returns:
  An iterator pointing at the pattern (End() if not found)

Definition at line 325 of file frost_utils_str_impl.cpp.

template<class T >

s_str_t< T >::iterator Frost::s_str_t< T >::Get | ( | const s_str_t< T > & | sValue | ) | `[inline]`

Returns the position of the pattern in the string.

Parameters:

  | sValue | The string to search for

Returns:
  An iterator pointing at the pattern (End() if not found)

Definition at line 315 of file frost_utils_str_impl.cpp.

template<class T >

s_uint_t< default_uint > Frost::s_str_t< T >::GetLength | ( |  | ) | const`[inline]`

Returns the number of character in the string.

Returns:
  The number of character in the string

Definition at line 486 of file frost_utils_str_impl.cpp.

template<class T >

s_uint_t< default_uint > Frost::s_str_t< T >::GetSize | ( |  | ) | const`[inline]`

Returns the number of character in ths string.

Returns:
  The number of character in the string

Definition at line 492 of file frost_utils_str_impl.cpp.

template<class T >

s_str_t< T >::iterator Frost::s_str_t< T >::Insert | ( | const s_str_t< T > & | sValue,
|  | iterator | iter |
| ) |  |  | `[inline]`

Adds another string somewhere in this string.

Parameters:

  | sValue | The string to insert
  | iter | The position at which to insert the string

Returns:
  An iterator pointing at the end of the inserted string

Definition at line 636 of file frost_utils_str_impl.cpp.

template<class T >

void Frost::s_str_t< T >::Insert | ( | const s_str_t< T > & | sValue,
|  | const s_uint_t< default_uint > & | uiPos |
| ) |  |  | `[inline]`

Adds another string somewhere in this string.

Parameters:

  | sValue | The string to insert
  | uiPos | The position at which to insert the char

Definition at line 627 of file frost_utils_str_impl.cpp.

template<class T >

s_str_t< T >::iterator Frost::s_str_t< T >::Insert | ( | const character & | cChar,
|  | iterator | iter |
| ) |  |  | `[inline]`

Adds a new character somewhere in the string.

Parameters:

  | cChar | The character to add
  | iter | The position at which to insert the char

Returns:
  An iterator pointing after the inserted char

Definition at line 621 of file frost_utils_str_impl.cpp.

template<class T >

void Frost::s_str_t< T >::Insert | ( | const character & | cChar,
|  | const s_uint_t< default_uint > & | uiPos |
| ) |  |  | `[inline]`

Adds a new character somewhere in the string.

Parameters:

  | cChar | The character to add
  | uiPos | The position at which to insert the char

Definition at line 612 of file frost_utils_str_impl.cpp.

template<class T >

s_bool Frost::s_str_t< T >::IsAlphaNumeric | ( | const frost_character & | cValue | ) | `[inline, static]`

Checks if the provided character is a letter or a number.

Parameters:

  | cValue | The character to test

Returns:
  'true' if the provided character is a letter or a number

Definition at line 856 of file frost_utils_str_impl.cpp.

template<class T >

s_bool Frost::s_str_t< T >::IsAlphaNumeric | ( | const character & | cValue | ) | `[inline, static]`

Checks if the provided character is a letter or a number.

Parameters:

  | cValue | The character to test

Returns:
  'true' if the provided character is a letter or a number

Definition at line 850 of file frost_utils_str_impl.cpp.

template<class T >

s_bool Frost::s_str_t< T >::IsBoolean | ( |  | ) | const`[inline]`

Checks if the string is a bool.

Returns:
  'true' if the string is a bool

Definition at line 478 of file frost_utils_str_impl.cpp.

template<class T >

s_bool Frost::s_str_t< T >::IsEmpty | ( | const s_bool & | bIgnoreSpaces = `false` | ) | const`[inline]`

Checks if the string is empty.

Parameters:

  | bIgnoreSpaces | Set to 'true' if you want a string to be reported as empty if it only contains white spaces and or tabs

Returns:
  'true' if the string doesn't contain any character

Definition at line 439 of file frost_utils_str_impl.cpp.

template<class T >

s_bool Frost::s_str_t< T >::IsNumber | ( | const frost_character & | cValue | ) | `[inline, static]`

Checks if the provided character is a number.

Parameters:

  | cValue | The character to test

Returns:
  'true' if the provided character is a number

Definition at line 841 of file frost_utils_str_impl.cpp.

template<class T >

s_bool Frost::s_str_t< T >::IsNumber | ( | const character & | cValue | ) | `[inline, static]`

Checks if the provided character is a number.

Parameters:

  | cValue | The character to test

Returns:
  'true' if the provided character is a number

Definition at line 832 of file frost_utils_str_impl.cpp.

template<class T >

s_bool Frost::s_str_t< T >::IsNumber | ( |  | ) | const`[inline]`

Checks if the string is a number.

Returns:
  'true' if the string is a number

Definition at line 469 of file frost_utils_str_impl.cpp.

template<class T >

s_bool Frost::s_str_t< T >::operator!= | ( | const s_str_t< T > & | mValue | ) | const`[inline]`

Definition at line 778 of file frost_utils_str_impl.cpp.

template<class T>
template<class N >

s_str_t Frost::s_str_t< T >::operator+ | ( | const N & | mValue | ) | const`[inline]`

Definition at line 459 of file frost_utils_str.h.

template<class T>
template<class N >

void Frost::s_str_t< T >::operator+= | ( | const N & | mValue | ) | `[inline]`

Definition at line 465 of file frost_utils_str.h.

template<class T >

s_bool Frost::s_str_t< T >::operator< | ( | const s_str_t< T > & | mValue | ) | const`[inline]`

Definition at line 784 of file frost_utils_str_impl.cpp.

template<class T>
template<class N >

s_str_t& Frost::s_str_t< T >::operator<< | ( | const N & | mValue | ) | `[inline]`

Definition at line 471 of file frost_utils_str.h.

template<class T >

s_bool Frost::s_str_t< T >::operator<= | ( | const s_str_t< T > & | mValue | ) | const`[inline]`

Definition at line 796 of file frost_utils_str_impl.cpp.

template<class T >

s_bool Frost::s_str_t< T >::operator== | ( | const s_str_t< T > & | mValue | ) | const`[inline]`

Definition at line 772 of file frost_utils_str_impl.cpp.

template<class T >

s_bool Frost::s_str_t< T >::operator> | ( | const s_str_t< T > & | mValue | ) | const`[inline]`

Definition at line 790 of file frost_utils_str_impl.cpp.

template<class T >

s_bool Frost::s_str_t< T >::operator>= | ( | const s_str_t< T > & | mValue | ) | const`[inline]`

Definition at line 802 of file frost_utils_str_impl.cpp.

template<class T >

const T & Frost::s_str_t< T >::operator[] | ( | const default_uint & | uiIndex | ) | const`[inline]`

Definition at line 766 of file frost_utils_str_impl.cpp.

template<class T >

T & Frost::s_str_t< T >::operator[] | ( | const default_uint & | uiIndex | ) | `[inline]`

Definition at line 760 of file frost_utils_str_impl.cpp.

template<class T >

const T & Frost::s_str_t< T >::operator[] | ( | const s_uint_t< default_uint > & | uiIndex | ) | const`[inline]`

Definition at line 754 of file frost_utils_str_impl.cpp.

template<class T >

T & Frost::s_str_t< T >::operator[] | ( | const s_uint_t< default_uint > & | uiIndex | ) | `[inline]`

Definition at line 748 of file frost_utils_str_impl.cpp.

template<class T >

void Frost::s_str_t< T >::PopBack | ( |  | ) | `[inline]`

Removes the last character.

Definition at line 562 of file frost_utils_str_impl.cpp.

template<class T >

void Frost::s_str_t< T >::PopFront | ( |  | ) | `[inline]`

Removes the first character.

Definition at line 593 of file frost_utils_str_impl.cpp.

template<class T >

void Frost::s_str_t< T >::PushBack | ( | const s_str_t< T > & | sValue | ) | `[inline]`

Adds a new string at the end of this string.

Parameters:

  | sValue | The string to add

Definition at line 556 of file frost_utils_str_impl.cpp.

template<class T >

void Frost::s_str_t< T >::PushBack | ( | const character & | cChar | ) | `[inline]`

Adds a new character at the end of the string.

Parameters:

  | cChar | The character to add

Definition at line 550 of file frost_utils_str_impl.cpp.

template<class T >

void Frost::s_str_t< T >::PushFront | ( | const s_str_t< T > & | sValue | ) | `[inline]`

Adds a new string at the beginning of this string.

Parameters:

  | sValue | The string to add

Definition at line 587 of file frost_utils_str_impl.cpp.

template<class T >

void Frost::s_str_t< T >::PushFront | ( | const character & | cChar | ) | `[inline]`

Adds a new character at the beginning of the string.

Parameters:

  | cChar | The character to add

Definition at line 581 of file frost_utils_str_impl.cpp.

template<class T >

s_uint_t< default_uint > Frost::s_str_t< T >::Replace | ( | const s_str_t< T > & | sPattern,
|  | const s_str_t< T > & | sReplacement |
| ) |  |  | `[inline]`

Replaces a pattern by another string.

Parameters:

  | sPattern | The string to search for
  | sReplacement | The string that will replace it

Returns:
  The number of replacement

Definition at line 534 of file frost_utils_str_impl.cpp.

template<class T >

s_str_t< T > Frost::s_str_t< T >::Reverse | ( | const s_str_t< T > & | sValue | ) | `[inline, static]`

Reverses the provided string.

Parameters:

  | sValue | The string to reverse

Returns:
  The reversed string

Definition at line 824 of file frost_utils_str_impl.cpp.

template<class T >

void Frost::s_str_t< T >::Reverse | ( |  | ) | `[inline]`

Inverts the order of the letters in the string.

Definition at line 652 of file frost_utils_str_impl.cpp.

template<class T >

s_bool Frost::s_str_t< T >::StartsWith | ( | const s_str_t< T > & | sPattern | ) | const`[inline]`

Checks if this string starts with the provided pattern.

Parameters:

  | sPattern | The pattern to search for

Returns:
  'true' if the pattern has been found

Definition at line 658 of file frost_utils_str_impl.cpp.

template<class T >

s_str_t< T > Frost::s_str_t< T >::ToLower | ( | const s_str_t< T > & | sValue | ) | `[inline, static]`

Makes the provided string lower case.

Parameters:

  | sValue | The string to modify

Returns:
  The lower cased string

Definition at line 808 of file frost_utils_str_impl.cpp.

template<class T >

void Frost::s_str_t< T >::ToLower | ( |  | ) | `[inline]`

Makes this string completely lower case.

Definition at line 498 of file frost_utils_str_impl.cpp.

template<class T >

s_str_t< T > Frost::s_str_t< T >::ToUpper | ( | const s_str_t< T > & | sValue | ) | `[inline, static]`

Makes the provided string UPPER CASE.

Parameters:

  | sValue | The string to modify

Returns:
  The upper cased string

Definition at line 816 of file frost_utils_str_impl.cpp.

template<class T >

void Frost::s_str_t< T >::ToUpper | ( |  | ) | `[inline]`

Makes this string completely UPPER CASE.

Definition at line 506 of file frost_utils_str_impl.cpp.

template<class T >

s_uint_t< default_uint > Frost::s_str_t< T >::Trim | ( | const character & | cPattern | ) | `[inline]`

Removes the surrounding characters matching the provided pattern.

Parameters:

  | cPattern | The character to remove

Returns:
  The number of character erased

Definition at line 514 of file frost_utils_str_impl.cpp.

## Member Data Documentation

template<class T>

const s_str_t< T > Frost::s_str_t< T >::EMPTY = ""`[inline, static]`

Definition at line 489 of file frost_utils_str.h.

template<class T>

string Frost::s_str_t< T >::sValue_`[private]`

Definition at line 566 of file frost_utils_str.h.

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

- D:/Programmation/Sources/Tensor2/Utils/include/frost_utils_str.h
- D:/Programmation/Sources/Tensor2/Utils/src/frost_utils_str_impl.cpp