Back to index

nux  3.0.0
Public Member Functions | Public Attributes | Friends
nux::NFileName Class Reference

#include <FileName.h>

Inheritance diagram for nux::NFileName:
Inheritance graph
[legend]
Collaboration diagram for nux::NFileName:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 NFileName ()
 NFileName (const NFileName &Filename)
 NFileName (const NString &str)
 NFileName (const ANSICHAR *str)
 NFileName (const UNICHAR *str)
void ConvertSlashToBackslash ()
 Replace all slash with backslash.
void ConvertBackslashToSlash ()
 Replace all backslash with slash.
void AddSlashAtEnd ()
 Add slash at the end if there isn't one already.
void AddBackSlashAtEnd ()
 Add backslash at the end if there isn't one already.
void AddSlashAtStart ()
 Add slash at the start if there isn't one already.
void AddBackSlashAtStart ()
 Add backslash at the start if there isn't one already.
void RemoveSlashAtEnd ()
 Remove slash at the end if there is one.
void RemoveBackSlashAtEnd ()
 Remove backslash at the end if there is one.
void RemoveSlashAtStart ()
 Remove slash at the start if there is one.
void RemoveBackSlashAtStart ()
 Remove backslash at the start if there is one.
void ConvertToCleanSlash ()
 Replace all backslash with slash. Replace multiple consecutive slash with one slash.
void ConvertToCleanBackslash ()
 Replace all slash with backslash. Replace multiple consecutive backslash with one backslash.
NString GetDrive () const
NString GetExtension () const
 Returns the text following the last period.
NString GetCleanFilename () const
 Returns the base filename, minus any path information.
NString GetFilenameNoExtension () const
 Returns the base filename, without the extension (keep the path)
NString GetBaseFilename () const
 Returns the same thing as GetCleanFilename, but without the extension.
NString GetDirectoryPath () const
 Returns the path in front of the filename.
void ChangeFileExtension (const TCHAR *ext)
 Change the file extension. Do not start ext with a dot character '.'. ie ext = "com".
const tstringGetTStringRef () const
const TCHARGetTCharPtr () const
size_t Length () const
size_t Size () const
void Clear ()
bool IsEmpty () const
void Erase (size_t Pos, size_t count)
NStringInsert (size_t Pos, const TCHAR *Ptr)
NStringInsert (size_t Pos, const TCHAR *Ptr, size_t Count)
NStringInsert (size_t Pos, const tstring &Str)
NStringInsert (size_t Pos, const tstring &Str, size_t Offset, size_t Count)
NStringInsert (size_t Pos, const NString &Str)
NStringInsert (size_t Pos, const NString &Str, size_t Offset, size_t Count)
NStringInsert (size_t Pos, int Count, const TCHAR &Ch)
const TCHARoperator[] (size_t ChPos) const
TCHARoperator[] (size_t ChPos)
NStringReplace (size_t Pos1, size_t Num1, const TCHAR *Ptr)
NStringReplace (size_t Pos1, size_t Num1, const TCHAR *Ptr, size_t Num2)
NStringReplace (size_t Pos1, size_t Num1, const tstring &Str)
NStringReplace (size_t Pos1, size_t Num1, const tstring &Str, size_t Pos2, size_t Num2)
NStringReplace (size_t Pos1, size_t Num1, const NString &Str)
NStringReplace (size_t Pos1, size_t Num1, const NString &Str, size_t Pos2, size_t Num2)
NStringReplace (size_t Pos1, size_t Num1, size_t Count, TCHAR Ch)
void Reverse ()
 Reverse the string.
NStringSearchAndReplace (TCHAR ChOut, TCHAR ChIn)
 Replace character ChOut with ChIn in the string.
size_t FindLastOccurence (const TCHAR &suffix) const
 Return The last position of the substring suffix or -1 if it is not found.
size_t FindLastOccurence (const TCHAR *suffix) const
 Return The last position of the substring suffix or -1 if it is not found.
size_t FindLastOccurence (const tstring &suffix) const
 Return The last position of the substring suffix or -1 if it is not found.
size_t FindLastOccurence (const NString &suffix) const
 Return The last position of the substring suffix or -1 if it is not found.
size_t FindFirstOccurence (const TCHAR &suffix) const
 Return the position of the first occurrence of the substring suffix or -1 if it is not found.
size_t FindFirstOccurence (const TCHAR *suffix) const
 Return the position of the first occurrence of the substring suffix or -1 if it is not found.
size_t FindFirstOccurence (const tstring &suffix) const
 Return the position of the first occurrence of the substring suffix or -1 if it is not found.
size_t FindFirstOccurence (const NString &suffix) const
 Return the position of the first occurrence of the substring suffix or -1 if it is not found.
size_t FindNextOccurence (const TCHAR &suffix, size_t start=0) const
 Return the position of the first occurrence of the substring suffix or -1 if it is not found.
size_t FindNextOccurence (const TCHAR *suffix, size_t start=0) const
 Return the position of the first occurrence of the substring suffix or -1 if it is not found.
size_t FindNextOccurence (const tstring &suffix, size_t start=0) const
 Return the position of the first occurrence of the substring suffix or -1 if it is not found.
size_t FindNextOccurence (const NString &suffix, size_t start=0) const
 Return the position of the first occurrence of the substring suffix or -1 if it is not found.
size_t FindFirstOccurenceOf (const TCHAR &str) const
 Return the position of the first occurrence of the substring suffix or -1 if it is not found.
size_t FindFirstOccurenceOf (const TCHAR *str) const
 Return the position of the first occurrence of the substring suffix or -1 if it is not found.
size_t FindFirstOccurenceOf (const tstring &str) const
 Return the position of the first occurrence of the substring suffix or -1 if it is not found.
size_t FindFirstOccurenceOf (const NString &str) const
 Return the position of the first occurrence of the substring suffix or -1 if it is not found.
size_t FindLastOccurenceOf (const TCHAR &str) const
 Return the position of the last occurrence of the substring suffix or -1 if it is not found.
size_t FindLastOccurenceOf (const TCHAR *str) const
 Return the position of the last occurrence of the substring suffix or -1 if it is not found.
size_t FindLastOccurenceOf (const tstring &str) const
 Return the position of the last occurrence of the substring suffix or -1 if it is not found.
size_t FindLastOccurenceOf (const NString &str) const
 Return the position of the last occurrence of the substring suffix or -1 if it is not found.
size_t Find (NString str, int start=0)
 Searches this string for the first match of a substring.
size_t Find (TCHAR c, int start=0)
 Searches this string for the first match of a character.
bool IsSuffix (const TCHAR &suffix)
 Return True if the string is terminated by the character 'suffix'.
bool IsSuffix (const TCHAR *suffix)
 Return True if the string is terminated by the character string 'suffix'.
bool IsSuffix (const tstring &suffix)
 Return True if the string is terminated by the tstring 'suffix'.
bool IsSuffix (const NString &suffix)
 Return True if the string is terminated by the NString 'suffix'.
bool IsPrefix (const TCHAR &prefix)
 Return True if the string start with the character contained in prefix.
bool IsPrefix (const TCHAR *prefix)
 Return True if the string start with the character string contained in prefix.
bool IsPrefix (const tstring &prefix)
 Return True if the string start with the tstring contained in prefix.
bool IsPrefix (const NString &prefix)
 Return True if the string start with the NString contained in prefix.
void RemoveSuffix (const TCHAR &suffix)
 Remove the suffix if it is present.
void RemoveSuffix (const TCHAR *suffix)
 Remove the suffix if it is present.
void RemoveSuffix (const tstring &suffix)
 Remove the suffix if it is present.
void RemoveSuffix (const NString &suffix)
 Remove the suffix if it is present.
void RemovePrefix (const TCHAR &prefix)
 Remove the prefix if it is present.
void RemovePrefix (const TCHAR *prefix)
 Remove the prefix if it is present.
void RemovePrefix (const tstring &prefix)
 Remove the prefix if it is present.
void RemovePrefix (const NString &prefix)
 Remove the prefix if it is present.
NString GetSubString (size_t count) const
 Return an NString of the first count characters.
NString GetSubString (size_t start, size_t count) const
 Return an NString of the first count characters starting at position start.
NString Mid (size_t count) const
 Extracts the first N characters..
NString Mid (size_t start, size_t count) const
 Extracts the middle part of a string.
NString Left (size_t N) const
 Extracts the left part of a string. At most N characters are extracted.
NString Right (size_t N) const
 Extracts the right part of a string. At most N characters are extracted.
NString Trim () const
 Trims all leading and trailing whitespace characters from the string.
NString TrimLeft () const
 Trim the white space characters at the start of this string. Return a trimmed NString.
NString TrimLeft (NString str) const
 Trim any of the characters in the argument string. Return a trimmed NString.
NString TrimRight () const
 Trim the white space characters at the end of this string. Return a trimmed NString.
NString TrimRight (NString str) const
 Trim any of the characters in the argument string. Return a trimmed NString.
TCHAR GetFirstChar () const
 Get first character.
TCHAR GetLastChar () const
 Get last character.
const TCHARoperator() () const
const TCHARoperator* () const
NStringoperator+= (const TCHAR &sufix)
 Append a character to this string.
NStringoperator+= (const TCHAR *sufix)
 Append a TCHAR* to this string.
NStringoperator+= (const tstring sufix)
 Append a tstring to this string.
NStringoperator+= (const NString sufix)
 Append an NString to this string.
void SplitAtFirstOccurenceOf (const TCHAR *SplitString, NString &Left, NString &Right)
void SplitAtFirstOccurenceOf (const TCHAR &SplitChar, NString &Left, NString &Right)
void SplitAtFirstOccurenceOf (const NString &SplitString, NString &Left, NString &Right)
void SplitAtLastOccurenceOf (const TCHAR *SplitString, NString &Left, NString &Right)
void SplitAtLastOccurenceOf (const TCHAR &SplitChar, NString &Left, NString &Right)
void SplitAtLastOccurenceOf (const NString &SplitString, NString &Left, NString &Right)
void ParseToArray (std::vector< NString > &StringArray, const NString &delimiter)
 VARARG_DECL (static NString, static NString, return, Printf, VARARG_NONE, const TCHAR *, VARARG_NONE, VARARG_NONE)
 Behave like printf.

Public Attributes

tstring m_string

Friends

bool operator!= (const NString &left, const NString &right)
bool operator== (const NString &left, const NString &right)
bool operator< (const NString &left, const NString &right)
bool operator<= (const NString &left, const NString &right)
bool operator> (const NString &left, const NString &right)
bool operator>= (const NString &left, const NString &right)
NString operator+ (const NString &left, const NString &right)
NString operator+ (const NString &left, const TCHAR *right)
NString operator+ (const NString &left, const TCHAR right)
NString operator+ (const TCHAR *left, const NString &right)
NString operator+ (const TCHAR left, const NString &right)
tostreamoperator<< (tostream &o, const NString &s)

Detailed Description

Definition at line 31 of file FileName.h.


Constructor & Destructor Documentation

Definition at line 34 of file FileName.h.

      : NString()
    {}
nux::NFileName::NFileName ( const NFileName Filename) [inline]

Definition at line 37 of file FileName.h.

      : NString ( Filename.GetTCharPtr() )
    {}
nux::NFileName::NFileName ( const NString str) [inline]

Definition at line 41 of file FileName.h.

      : NString ( str )
    {}
nux::NFileName::NFileName ( const ANSICHAR str) [inline]

Definition at line 45 of file FileName.h.

      : NString ( str )
    {}
nux::NFileName::NFileName ( const UNICHAR str) [inline]

Definition at line 48 of file FileName.h.

      : NString ( str )
    {}

Member Function Documentation

Add backslash at the end if there isn't one already.

Definition at line 160 of file FileName.cpp.

  {
    if (GetLastChar() != TEXT ('\\') )
      *this += TEXT ('\\');
  }

Here is the call graph for this function:

Add backslash at the start if there isn't one already.

Definition at line 172 of file FileName.cpp.

  {
    if (GetFirstChar() != TEXT ('\\') )
      Insert (0, 1, TEXT ('\\') );
  }

Here is the call graph for this function:

Add slash at the end if there isn't one already.

Definition at line 154 of file FileName.cpp.

  {
    if (GetLastChar() != TEXT ('/') )
      *this += TEXT ('/');
  }

Here is the call graph for this function:

Add slash at the start if there isn't one already.

Definition at line 166 of file FileName.cpp.

  {
    if (GetFirstChar() != TEXT ('/') )
      Insert (0, 1, TEXT ('/') );
  }

Here is the call graph for this function:

Change the file extension. Do not start ext with a dot character '.'. ie ext = "com".

Definition at line 117 of file FileName.cpp.

  {
    size_t Pos = FindLastOccurence (TEXT (".") );

    if (Pos != tstring::npos)
    {
      (*this) = GetSubString (Pos) + NString (TEXT (".") ) + NString (ext);
    }
    else
    {
      (*this) = (*this) + NString (TEXT (".") ) + NString (ext);
    }
  }

Here is the call graph for this function:

void nux::NString::Clear ( ) [inherited]

Definition at line 420 of file TextString.cpp.

  {
    m_string.clear();
  }

Here is the caller graph for this function:

Replace all backslash with slash.

Definition at line 143 of file FileName.cpp.

  {
    size_t Pos = tstring::npos;
    Pos = FindFirstOccurence (TEXT ('\\') );

    while (Pos != tstring::npos)
    {
      Replace (Pos, 1, 1, TEXT ('/') );
    }
  }

Here is the call graph for this function:

Here is the caller graph for this function:

Replace all slash with backslash.

Definition at line 131 of file FileName.cpp.

  {
    size_t Pos = tstring::npos;
    Pos = FindFirstOccurence (TEXT ('/') );

    while (Pos != tstring::npos)
    {
      Replace (Pos, 1, 1, TEXT ('\\') );
    }
  }

Here is the call graph for this function:

Here is the caller graph for this function:

Replace all slash with backslash. Replace multiple consecutive backslash with one backslash.

Definition at line 218 of file FileName.cpp.

  {
    ConvertSlashToBackslash();

    size_t size = Size();

    for (size_t i = 0; i < size; )
    {
      if ( (i < size - 1) && (operator[] (i) == TEXT ('\\') ) && (operator[] (i + 1) == TEXT ('\\') ) )
      {
        Erase (i + 1, 1);
      }
      else
      {
        i++;
      }
    }
  }

Here is the call graph for this function:

Replace all backslash with slash. Replace multiple consecutive slash with one slash.

Definition at line 198 of file FileName.cpp.

  {
    ConvertBackslashToSlash();

    size_t size = Size();

    for (size_t i = 0; i < size; )
    {
      if ( (i < size - 1) && (operator[] (i) == TEXT ('/') ) && (operator[] (i + 1) == TEXT ('/') ) )
      {
        Erase (i + 1, 1);
        --size;
      }
      else
      {
        i++;
      }
    }
  }

Here is the call graph for this function:

void nux::NString::Erase ( size_t  Pos,
size_t  count 
) [inherited]

Definition at line 430 of file TextString.cpp.

  {
    m_string.erase (Pos, Count);
  }

Here is the caller graph for this function:

size_t nux::NString::Find ( NString  str,
int  start = 0 
) [inherited]

Searches this string for the first match of a substring.

Definition at line 746 of file TextString.cpp.

  {
    size_t pos = m_string.find (str.m_string, start);
    return (pos != tstring::npos) ? pos : -1;
  }
size_t nux::NString::Find ( TCHAR  c,
int  start = 0 
) [inherited]

Searches this string for the first match of a character.

Definition at line 752 of file TextString.cpp.

  {
    size_t pos = m_string.find (c, start);
    return (pos != tstring::npos) ? pos : -1;
  }
size_t nux::NString::FindFirstOccurence ( const TCHAR suffix) const [inherited]

Return the position of the first occurrence of the substring suffix or -1 if it is not found.

Definition at line 625 of file TextString.cpp.

  {
    size_t pos = 0;
    pos = m_string.find (suffix, pos);
    return (pos != tstring::npos) ? pos : -1;
  }

Here is the caller graph for this function:

size_t nux::NString::FindFirstOccurence ( const TCHAR suffix) const [inherited]

Return the position of the first occurrence of the substring suffix or -1 if it is not found.

Definition at line 633 of file TextString.cpp.

  {
    size_t pos = 0;
    pos = m_string.find (suffix, pos);
    return (pos != tstring::npos) ? pos : -1;
  }
size_t nux::NString::FindFirstOccurence ( const tstring suffix) const [inherited]

Return the position of the first occurrence of the substring suffix or -1 if it is not found.

Definition at line 641 of file TextString.cpp.

  {
    size_t pos = 0;
    pos = m_string.find (suffix, pos);
    return (pos != tstring::npos) ? pos : -1;
  }
size_t nux::NString::FindFirstOccurence ( const NString suffix) const [inherited]

Return the position of the first occurrence of the substring suffix or -1 if it is not found.

Definition at line 649 of file TextString.cpp.

  {
    size_t pos = 0;
    pos = m_string.find (suffix.m_string, pos);
    return (pos != tstring::npos) ? pos : -1;
  }
size_t nux::NString::FindFirstOccurenceOf ( const TCHAR str) const [inherited]

Return the position of the first occurrence of the substring suffix or -1 if it is not found.

Searches through a string for the first character that matches any element of a specified string. Return -1 if it is not found.

Definition at line 689 of file TextString.cpp.

  {
    size_t pos = 0;
    pos = m_string.find_first_of (str, pos);
    return (pos != tstring::npos) ? pos : -1;
  }

Here is the caller graph for this function:

size_t nux::NString::FindFirstOccurenceOf ( const TCHAR str) const [inherited]

Return the position of the first occurrence of the substring suffix or -1 if it is not found.

Searches through a string for the first character that matches any element of a specified string. Return -1 if it is not found.

Definition at line 696 of file TextString.cpp.

  {
    size_t pos = 0;
    pos = m_string.find_first_of (str, pos);
    return (pos != tstring::npos) ? pos : -1;
  }
size_t nux::NString::FindFirstOccurenceOf ( const tstring str) const [inherited]

Return the position of the first occurrence of the substring suffix or -1 if it is not found.

Searches through a string for the first character that matches any element of a specified string. Return -1 if it is not found.

Definition at line 703 of file TextString.cpp.

  {
    size_t pos = 0;
    pos = m_string.find_first_of (str, pos);
    return (pos != tstring::npos) ? pos : -1;
  }
size_t nux::NString::FindFirstOccurenceOf ( const NString str) const [inherited]

Return the position of the first occurrence of the substring suffix or -1 if it is not found.

Searches through a string for the first character that matches any element of a specified string. Return -1 if it is not found.

Definition at line 710 of file TextString.cpp.

  {
    size_t pos = 0;
    pos = m_string.find_first_of (str.m_string, pos);
    return (pos != tstring::npos) ? pos : -1;
  }
size_t nux::NString::FindLastOccurence ( const TCHAR suffix) const [inherited]

Return The last position of the substring suffix or -1 if it is not found.

Definition at line 552 of file TextString.cpp.

  {
    size_t start = 0;
    size_t pos = 0;

    do
    {
      pos = m_string.find (suffix, start);

      if (pos != tstring::npos)
        start = pos + 1;
    }
    while (pos != tstring::npos);

    return start - 1;
  }

Here is the caller graph for this function:

size_t nux::NString::FindLastOccurence ( const TCHAR suffix) const [inherited]

Return The last position of the substring suffix or -1 if it is not found.

Definition at line 570 of file TextString.cpp.

  {
    size_t start = 0;
    size_t pos = 0;

    do
    {
      pos = m_string.find (suffix, start);

      if (pos != tstring::npos)
        start = pos + 1;
    }
    while (pos != tstring::npos);

    return start - 1;
  }
size_t nux::NString::FindLastOccurence ( const tstring suffix) const [inherited]

Return The last position of the substring suffix or -1 if it is not found.

Definition at line 588 of file TextString.cpp.

  {
    size_t start = 0;
    size_t pos = 0;

    do
    {
      pos = m_string.find (suffix, start);

      if (pos != tstring::npos)
        start = pos + 1;
    }
    while (pos != tstring::npos);

    return start - 1;
  }
size_t nux::NString::FindLastOccurence ( const NString suffix) const [inherited]

Return The last position of the substring suffix or -1 if it is not found.

Definition at line 606 of file TextString.cpp.

  {
    size_t start = 0;
    size_t pos = 0;

    do
    {
      pos = m_string.find (suffix.m_string, start);

      if (pos != tstring::npos)
        start = pos + 1;
    }
    while (pos != tstring::npos);

    return start - 1;
  }
size_t nux::NString::FindLastOccurenceOf ( const TCHAR str) const [inherited]

Return the position of the last occurrence of the substring suffix or -1 if it is not found.

Searches through a string for the last character that matches any element of a specified string. Return -1 if it is not found.

Definition at line 718 of file TextString.cpp.

  {
    size_t pos = 0;
    pos = m_string.find_last_of (str, pos);
    return (pos != tstring::npos) ? pos : -1;
  }
size_t nux::NString::FindLastOccurenceOf ( const TCHAR str) const [inherited]

Return the position of the last occurrence of the substring suffix or -1 if it is not found.

Searches through a string for the last character that matches any element of a specified string. Return -1 if it is not found.

Definition at line 725 of file TextString.cpp.

  {
    size_t pos = 0;
    pos = m_string.find_last_of (str, pos);
    return (pos != tstring::npos) ? pos : -1;
  }
size_t nux::NString::FindLastOccurenceOf ( const tstring str) const [inherited]

Return the position of the last occurrence of the substring suffix or -1 if it is not found.

Searches through a string for the last character that matches any element of a specified string. Return -1 if it is not found.

Definition at line 732 of file TextString.cpp.

  {
    size_t pos = 0;
    pos = m_string.find_last_of (str, pos);
    return (pos != tstring::npos) ? pos : -1;
  }
size_t nux::NString::FindLastOccurenceOf ( const NString str) const [inherited]

Return the position of the last occurrence of the substring suffix or -1 if it is not found.

Searches through a string for the last character that matches any element of a specified string. Return -1 if it is not found.

Definition at line 739 of file TextString.cpp.

  {
    size_t pos = 0;
    pos = m_string.find_last_of (str.m_string, pos);
    return (pos != tstring::npos) ? pos : -1;
  }
size_t nux::NString::FindNextOccurence ( const TCHAR suffix,
size_t  start = 0 
) const [inherited]

Return the position of the first occurrence of the substring suffix or -1 if it is not found.

Definition at line 657 of file TextString.cpp.

  {
    size_t pos = 0;
    pos = m_string.find (suffix, start);
    return (pos != tstring::npos) ? pos : -1;
  }

Here is the caller graph for this function:

size_t nux::NString::FindNextOccurence ( const TCHAR suffix,
size_t  start = 0 
) const [inherited]

Return the position of the first occurrence of the substring suffix or -1 if it is not found.

Definition at line 665 of file TextString.cpp.

  {
    size_t pos = 0;
    pos = m_string.find (suffix, start);
    return (pos != tstring::npos) ? pos : -1;
  }
size_t nux::NString::FindNextOccurence ( const tstring suffix,
size_t  start = 0 
) const [inherited]

Return the position of the first occurrence of the substring suffix or -1 if it is not found.

Definition at line 673 of file TextString.cpp.

  {
    size_t pos = 0;
    pos = m_string.find (suffix, start);
    return (pos != tstring::npos) ? pos : -1;
  }
size_t nux::NString::FindNextOccurence ( const NString suffix,
size_t  start = 0 
) const [inherited]

Return the position of the first occurrence of the substring suffix or -1 if it is not found.

Definition at line 681 of file TextString.cpp.

  {
    size_t pos = 0;
    pos = m_string.find (suffix.m_string, start);
    return (pos != tstring::npos) ? pos : -1;
  }

Returns the same thing as GetCleanFilename, but without the extension.

Definition at line 87 of file FileName.cpp.

  {
    NString Wk = GetCleanFilename();

    size_t Pos = Wk.FindLastOccurence (TEXT (".") );

    if (Pos != tstring::npos)
    {
      return Wk.GetSubString (Pos);
    }

    return Wk;
  }

Here is the call graph for this function:

Returns the base filename, minus any path information.

Definition at line 60 of file FileName.cpp.

  {
    size_t Pos = FindLastOccurence (NUX_BACKSLASH_CHAR);
    Pos = Max<size_t> (Pos, FindLastOccurence (TEXT ("/") ) ); // in case we are using slash and the NUX_BACKSLASH_CHAR is different.
    Pos = Max<size_t> (Pos, FindLastOccurence (TEXT ("\\") ) ); // in case we are using backslash and the NUX_BACKSLASH_CHAR is different.

    if (Pos != tstring::npos)
    {
      return GetSubString (Pos + 1, Length() - Pos - 1);
    }

    return *this;
  }

Here is the call graph for this function:

Here is the caller graph for this function:

Returns the path in front of the filename.

Definition at line 103 of file FileName.cpp.

  {
    size_t Pos = FindLastOccurence (NUX_BACKSLASH_CHAR);
    Pos = Max<size_t> (Pos, FindLastOccurence (TEXT ("/") ) ); // in case we are using slash and the NUX_BACKSLASH_CHAR is different.
    Pos = Max<size_t> (Pos, FindLastOccurence (TEXT ("\\") ) ); // in case we are using backslash and the NUX_BACKSLASH_CHAR is different.

    if (Pos != tstring::npos)
    {
      return GetSubString (Pos);
    }

    return *this;
  }

Here is the call graph for this function:

Definition at line 30 of file FileName.cpp.

  {
    size_t Pos = FindFirstOccurence (NUX_BACKSLASH_CHAR);

    if (Pos == tstring::npos)
    {
      Pos = FindFirstOccurence ("\\");

      if (Pos != tstring::npos)
      {
        return GetSubString (Pos);
      }
    }

    return TEXT ("");
  }

Here is the call graph for this function:

Returns the text following the last period.

Definition at line 47 of file FileName.cpp.

  {
    size_t Pos = FindLastOccurence (TEXT (".") );

    if (Pos != tstring::npos)
    {
      return GetSubString (Pos + 1, Length() - Pos - 1);
    }

    return TEXT ("");
  }

Here is the call graph for this function:

Returns the base filename, without the extension (keep the path)

Definition at line 74 of file FileName.cpp.

  {
    size_t Pos = FindLastOccurence (TEXT (".") );

    if (Pos != tstring::npos)
    {
      return GetSubString (Pos);
    }

    return *this;
  }

Here is the call graph for this function:

TCHAR nux::NString::GetFirstChar ( ) const [inherited]

Get first character.

Returns:
The first character or 0 if the string is empty.

Definition at line 1259 of file TextString.cpp.

  {
    if (IsEmpty() )
      return 0;
    return m_string[0];
  }

Here is the call graph for this function:

Here is the caller graph for this function:

TCHAR nux::NString::GetLastChar ( ) const [inherited]

Get last character.

Returns:
The last character or 0 if the string is empty.

Definition at line 1266 of file TextString.cpp.

  {
    if (IsEmpty() )
      return 0;
    return m_string[Size()-1];
  }

Here is the call graph for this function:

Here is the caller graph for this function:

NString nux::NString::GetSubString ( size_t  count) const [inherited]

Return an NString of the first count characters.

Definition at line 977 of file TextString.cpp.

  {
    nuxAssert (count >= 0);
    return NString (m_string.substr (0, count) );
  }

Here is the call graph for this function:

Here is the caller graph for this function:

NString nux::NString::GetSubString ( size_t  start,
size_t  count 
) const [inherited]

Return an NString of the first count characters starting at position start.

Definition at line 983 of file TextString.cpp.

  {
    nuxAssert (start >= 0);
    nuxAssert (count >= 0);
    return NString (m_string.substr (start, count) );
  }

Here is the call graph for this function:

const TCHAR * nux::NString::GetTCharPtr ( ) const [inherited]

Definition at line 405 of file TextString.cpp.

  {
    return m_string.c_str();
  }
const tstring & nux::NString::GetTStringRef ( ) const [inherited]

Definition at line 395 of file TextString.cpp.

  {
    return m_string;
  }

Here is the caller graph for this function:

NString & nux::NString::Insert ( size_t  Pos,
const TCHAR Ptr 
) [inherited]

Definition at line 435 of file TextString.cpp.

  {
    m_string.insert (Pos, Ptr);
    return *this;
  }

Here is the caller graph for this function:

NString & nux::NString::Insert ( size_t  Pos,
const TCHAR Ptr,
size_t  Count 
) [inherited]

Definition at line 441 of file TextString.cpp.

  {
    m_string.insert (Pos, Ptr, Count);
    return *this;
  }
NString & nux::NString::Insert ( size_t  Pos,
const tstring Str 
) [inherited]

Definition at line 447 of file TextString.cpp.

  {
    m_string.insert (Pos, Str);
    return *this;
  }
NString & nux::NString::Insert ( size_t  Pos,
const tstring Str,
size_t  Offset,
size_t  Count 
) [inherited]

Definition at line 453 of file TextString.cpp.

  {
    m_string.insert (Pos, Str, Offset, Count);
    return *this;
  }
NString & nux::NString::Insert ( size_t  Pos,
const NString Str 
) [inherited]

Definition at line 459 of file TextString.cpp.

  {
    m_string.insert (Pos, Str.m_string);
    return *this;
  }
NString & nux::NString::Insert ( size_t  Pos,
const NString Str,
size_t  Offset,
size_t  Count 
) [inherited]

Definition at line 465 of file TextString.cpp.

  {
    m_string.insert (Pos, Str.m_string, Offset, Count);
    return *this;
  }
NString & nux::NString::Insert ( size_t  Pos,
int  Count,
const TCHAR Ch 
) [inherited]

Definition at line 471 of file TextString.cpp.

  {
    m_string.insert (Pos, Count, Ch);
    return *this;
  }
bool nux::NString::IsEmpty ( ) const [inherited]

Definition at line 425 of file TextString.cpp.

  {
    return m_string.empty();
  }

Here is the caller graph for this function:

bool nux::NString::IsPrefix ( const TCHAR prefix) [inherited]

Return True if the string start with the character contained in prefix.

Definition at line 836 of file TextString.cpp.

  {
    size_t l = m_string.length() - 1;

    if (l < 0)
      return false;

    size_t pos = FindFirstOccurence (prefix);

    if (pos == tstring::npos)
      return false;

    return (pos == 0);
  }

Here is the call graph for this function:

Here is the caller graph for this function:

bool nux::NString::IsPrefix ( const TCHAR prefix) [inherited]

Return True if the string start with the character string contained in prefix.

Definition at line 852 of file TextString.cpp.

  {
    size_t sl = StringLength (prefix);

    if (sl == 0)
      return false;

    size_t pos = FindFirstOccurence (prefix);

    if (pos == tstring::npos)
      return false;

    return (pos == 0);
  }

Here is the call graph for this function:

bool nux::NString::IsPrefix ( const tstring prefix) [inherited]

Return True if the string start with the tstring contained in prefix.

Definition at line 868 of file TextString.cpp.

  {
    size_t sl = prefix.length();

    if (sl == 0)
      return false;

    size_t pos = FindFirstOccurence (prefix);

    if (pos == tstring::npos)
      return false;

    return (pos == 0);
  }

Here is the call graph for this function:

bool nux::NString::IsPrefix ( const NString prefix) [inherited]

Return True if the string start with the NString contained in prefix.

Definition at line 883 of file TextString.cpp.

  {
    size_t sl = prefix.Length();

    if (sl == 0)
      return false;

    size_t pos = FindFirstOccurence (prefix);

    if (pos == tstring::npos)
      return false;

    return (pos == 0);
  }

Here is the call graph for this function:

bool nux::NString::IsSuffix ( const TCHAR suffix) [inherited]

Return True if the string is terminated by the character 'suffix'.

Definition at line 758 of file TextString.cpp.

  {
    size_t l = m_string.length() - 1;

    if (l < 0)
      return false;

    size_t pos = FindLastOccurence (suffix);

    if (pos == tstring::npos)
      return false;

    return (pos == l);
  }

Here is the call graph for this function:

Here is the caller graph for this function:

bool nux::NString::IsSuffix ( const TCHAR suffix) [inherited]

Return True if the string is terminated by the character string 'suffix'.

Definition at line 773 of file TextString.cpp.

  {
    size_t sl = StringLength (suffix);

    if (sl == 0)
      return false;

    size_t l = m_string.length() - sl;

    if (l < 0)
      return false;

    size_t pos = FindLastOccurence (suffix);

    if (pos == tstring::npos)
      return false;

    return (pos == l);
  }

Here is the call graph for this function:

bool nux::NString::IsSuffix ( const tstring suffix) [inherited]

Return True if the string is terminated by the tstring 'suffix'.

Return True is the the string is terminated by the tstring 'suffix'.

Definition at line 794 of file TextString.cpp.

  {
    size_t sl = suffix.length();

    if (sl == 0)
      return false;

    size_t l = m_string.length() - sl;

    if (l < 0)
      return false;

    size_t pos = FindLastOccurence (suffix);

    if (pos == tstring::npos)
      return false;

    return (pos == l);
  }

Here is the call graph for this function:

bool nux::NString::IsSuffix ( const NString suffix) [inherited]

Return True if the string is terminated by the NString 'suffix'.

Return True is the the string is terminated by the NString 'suffix'.

Definition at line 815 of file TextString.cpp.

  {
    size_t sl = suffix.Length();

    if (sl == 0)
      return false;

    size_t l = m_string.length() - sl;

    if (l < 0)
      return false;

    size_t pos = FindLastOccurence (suffix);

    if (pos == tstring::npos)
      return false;

    return (pos == l);
  }

Here is the call graph for this function:

NString nux::NString::Left ( size_t  N) const [inherited]

Extracts the left part of a string. At most N characters are extracted.

Definition at line 1000 of file TextString.cpp.

  {
    if (N >= Length() )
      return *this;

    return GetSubString (0, N);
  }

Here is the call graph for this function:

Here is the caller graph for this function:

size_t nux::NString::Length ( ) const [inherited]

Definition at line 410 of file TextString.cpp.

  {
    return m_string.length();
  }

Here is the caller graph for this function:

NString nux::NString::Mid ( size_t  count) const [inherited]

Extracts the first N characters..

Definition at line 990 of file TextString.cpp.

  {
    return GetSubString (count);
  }

Here is the call graph for this function:

NString nux::NString::Mid ( size_t  start,
size_t  count 
) const [inherited]

Extracts the middle part of a string.

Definition at line 995 of file TextString.cpp.

  {
    return GetSubString (start, count);
  }

Here is the call graph for this function:

const TCHAR * nux::NString::operator() ( ) const [inherited]

Definition at line 1131 of file TextString.cpp.

  {
    if (Size() == 0)
      return 0;

    return GetTCharPtr();
  }

Here is the call graph for this function:

const TCHAR * nux::NString::operator* ( ) const [inherited]

Definition at line 1139 of file TextString.cpp.

  {
    if (Size() == 0)
      return 0;

    return GetTCharPtr();
  }

Here is the call graph for this function:

NString & nux::NString::operator+= ( const TCHAR sufix) [inherited]

Append a character to this string.

Definition at line 1152 of file TextString.cpp.

  {
    m_string += sufix;
    return *this;
  }
NString & nux::NString::operator+= ( const TCHAR sufix) [inherited]

Append a TCHAR* to this string.

Definition at line 1158 of file TextString.cpp.

  {
    m_string += sufix;
    return *this;
  }
NString & nux::NString::operator+= ( const tstring  sufix) [inherited]

Append a tstring to this string.

Definition at line 1164 of file TextString.cpp.

  {
    m_string += sufix;
    return *this;
  }
NString & nux::NString::operator+= ( const NString  sufix) [inherited]

Append an NString to this string.

Definition at line 1170 of file TextString.cpp.

  {
    m_string += sufix.m_string;
    return *this;
  }
const TCHAR & nux::NString::operator[] ( size_t  ChPos) const [inherited]

Definition at line 477 of file TextString.cpp.

  {
    return m_string[ChPos];
  }
TCHAR & nux::NString::operator[] ( size_t  ChPos) [inherited]

Definition at line 482 of file TextString.cpp.

  {
    return m_string[ChPos];
  }
void nux::NString::ParseToArray ( std::vector< NString > &  StringArray,
const NString delimiter 
) [inherited]

Definition at line 1230 of file TextString.cpp.

  {
    NString Left;
    NString Right;
    NString Temp;
    SplitAtFirstOccurenceOf (delimiter, Left, Temp);

    if (Left.Size() )
    {
      Left = Left.Trim();
      StringArray.push_back (Left);
    }

    Right = Temp;

    while (Right.Size() )
    {
      Right.SplitAtFirstOccurenceOf (delimiter, Left, Temp);

      if (Left.Size() )
      {
        Left = Left.Trim();
        StringArray.push_back (Left);
      }

      Right = Temp;
    }
  }

Here is the call graph for this function:

Remove backslash at the end if there is one.

Definition at line 183 of file FileName.cpp.

  {
    RemoveSuffix (TEXT ('\\') );
  }

Here is the call graph for this function:

Remove backslash at the start if there is one.

Definition at line 193 of file FileName.cpp.

  {
    RemovePrefix (TEXT ('\\') );
  }

Here is the call graph for this function:

void nux::NString::RemovePrefix ( const TCHAR prefix) [inherited]

Remove the prefix if it is present.

Return an NString striped out of the prefix contained in prefix.

Definition at line 939 of file TextString.cpp.

  {
    if (IsPrefix (prefix) )
    {
      *this = NString (m_string.substr (1) );
    }
  }

Here is the call graph for this function:

Here is the caller graph for this function:

void nux::NString::RemovePrefix ( const TCHAR prefix) [inherited]

Remove the prefix if it is present.

Return an NString striped out of the prefix contained in prefix.

Definition at line 948 of file TextString.cpp.

  {
    if (IsPrefix (prefix) )
    {
      size_t l = StringLength (prefix);
      *this = NString (m_string.substr (l) );
    }
  }

Here is the call graph for this function:

void nux::NString::RemovePrefix ( const tstring prefix) [inherited]

Remove the prefix if it is present.

Return an NString striped out of the prefix contained in prefix.

Definition at line 958 of file TextString.cpp.

  {
    if (IsPrefix (prefix) )
    {
      size_t l = prefix.length();
      *this = NString (m_string.substr (l) );
    }
  }

Here is the call graph for this function:

void nux::NString::RemovePrefix ( const NString prefix) [inherited]

Remove the prefix if it is present.

Return an NString striped out of the prefix contained in prefix.

Definition at line 968 of file TextString.cpp.

  {
    if (IsPrefix (prefix) )
    {
      size_t l = prefix.Length();
      *this = NString (m_string.substr (l) );
    }
  }

Here is the call graph for this function:

Remove slash at the end if there is one.

Definition at line 178 of file FileName.cpp.

  {
    RemoveSuffix (TEXT ('/') );
  }

Here is the call graph for this function:

Remove slash at the start if there is one.

Definition at line 188 of file FileName.cpp.

  {
    RemovePrefix (TEXT ('/') );
  }

Here is the call graph for this function:

void nux::NString::RemoveSuffix ( const TCHAR suffix) [inherited]

Remove the suffix if it is present.

Return an NString without the character contained in suffix.

Definition at line 899 of file TextString.cpp.

  {
    if (IsSuffix (suffix) )
    {
      size_t pos = FindLastOccurence (suffix);
      *this = NString (m_string.substr (0, pos) );
    }
  }

Here is the call graph for this function:

Here is the caller graph for this function:

void nux::NString::RemoveSuffix ( const TCHAR suffix) [inherited]

Remove the suffix if it is present.

Return an NString without the character string 'suffix'.

Definition at line 909 of file TextString.cpp.

  {
    if (IsSuffix (suffix) )
    {
      size_t pos = FindLastOccurence (suffix);
      *this = NString (m_string.substr (0, pos) );
    }
  }

Here is the call graph for this function:

void nux::NString::RemoveSuffix ( const tstring suffix) [inherited]

Remove the suffix if it is present.

Return an NString without the tstring 'suffix'.

Definition at line 919 of file TextString.cpp.

  {
    if (IsSuffix (suffix) )
    {
      size_t pos = FindLastOccurence (suffix);
      *this = NString (m_string.substr (0, pos) );
    }
  }

Here is the call graph for this function:

void nux::NString::RemoveSuffix ( const NString suffix) [inherited]

Remove the suffix if it is present.

Return an NString without the NString 'suffix'.

Definition at line 929 of file TextString.cpp.

  {
    if (IsSuffix (suffix) )
    {
      size_t pos = FindLastOccurence (suffix);
      *this = NString (m_string.substr (0, pos) );
    }
  }

Here is the call graph for this function:

NString & nux::NString::Replace ( size_t  Pos1,
size_t  Num1,
const TCHAR Ptr 
) [inherited]

Definition at line 487 of file TextString.cpp.

  {
    m_string.replace (Pos1, Num1, Ptr);
    return *this;
  }

Here is the caller graph for this function:

NString & nux::NString::Replace ( size_t  Pos1,
size_t  Num1,
const TCHAR Ptr,
size_t  Num2 
) [inherited]

Definition at line 493 of file TextString.cpp.

  {
    m_string.replace (Pos1, Num1, Ptr, Num2);
    return *this;
  }
NString & nux::NString::Replace ( size_t  Pos1,
size_t  Num1,
const tstring Str 
) [inherited]

Definition at line 499 of file TextString.cpp.

  {
    m_string.replace (Pos1, Num1, Str);
    return *this;
  }
NString & nux::NString::Replace ( size_t  Pos1,
size_t  Num1,
const tstring Str,
size_t  Pos2,
size_t  Num2 
) [inherited]

Definition at line 505 of file TextString.cpp.

  {
    m_string.replace (Pos1, Num1, Str, Pos2, Num2);
    return *this;
  }
NString & nux::NString::Replace ( size_t  Pos1,
size_t  Num1,
const NString Str 
) [inherited]

Definition at line 511 of file TextString.cpp.

  {
    m_string.replace (Pos1, Num1, Str.m_string);
    return *this;
  }
NString & nux::NString::Replace ( size_t  Pos1,
size_t  Num1,
const NString Str,
size_t  Pos2,
size_t  Num2 
) [inherited]

Definition at line 517 of file TextString.cpp.

  {
    m_string.replace (Pos1, Num1, Str.m_string, Pos2, Num2);
    return *this;
  }
NString & nux::NString::Replace ( size_t  Pos1,
size_t  Num1,
size_t  Count,
TCHAR  Ch 
) [inherited]

Definition at line 523 of file TextString.cpp.

  {
    m_string.replace (Pos1, Num1, Count, Ch);
    return *this;
  }
void nux::NString::Reverse ( ) [inherited]

Reverse the string.

Definition at line 529 of file TextString.cpp.

  {
    NString rev;
    size_t l = Length();

    for (size_t i = l - 1; i >= 0; i--)
    {
      rev += m_string[i];
    }

    (*this) = rev;
  }

Here is the call graph for this function:

Here is the caller graph for this function:

NString nux::NString::Right ( size_t  N) const [inherited]

Extracts the right part of a string. At most N characters are extracted.

Definition at line 1008 of file TextString.cpp.

  {
    if (N >= Length() )
      return *this;

    return GetSubString (Length() - N, N);
  }

Here is the call graph for this function:

Here is the caller graph for this function:

NString & nux::NString::SearchAndReplace ( TCHAR  ChOut,
TCHAR  ChIn 
) [inherited]

Replace character ChOut with ChIn in the string.

Definition at line 542 of file TextString.cpp.

  {
    for (size_t i = 0; i < Length(); i++)
      if (m_string[i] == ChOut)
        m_string[i] = ChIn;

    return *this;
  }

Here is the call graph for this function:

size_t nux::NString::Size ( ) const [inherited]

Definition at line 415 of file TextString.cpp.

  {
    return m_string.size();
  }

Here is the caller graph for this function:

void nux::NString::SplitAtFirstOccurenceOf ( const TCHAR SplitString,
NString Left,
NString Right 
) [inherited]

Definition at line 1176 of file TextString.cpp.

  {
    size_t start = FindFirstOccurence (SplitString);

    if (start != tstring::npos)
    {
      size_t size = StringLength (SplitString);
      Left = GetSubString (0, start);
      Right = GetSubString (start + size, Length() - (start + size) );
    }
    else
    {
      Left = *this;
      Right = "";
    }
  }

Here is the call graph for this function:

Here is the caller graph for this function:

void nux::NString::SplitAtFirstOccurenceOf ( const TCHAR SplitChar,
NString Left,
NString Right 
) [inherited]

Definition at line 1193 of file TextString.cpp.

  {
    SplitAtFirstOccurenceOf (NString (SplitChar), Left, Right);
  }

Here is the call graph for this function:

void nux::NString::SplitAtFirstOccurenceOf ( const NString SplitString,
NString Left,
NString Right 
) [inherited]

Definition at line 1198 of file TextString.cpp.

  {
    SplitAtFirstOccurenceOf (SplitString.GetTCharPtr(), Left, Right);
  }

Here is the call graph for this function:

void nux::NString::SplitAtLastOccurenceOf ( const TCHAR SplitString,
NString Left,
NString Right 
) [inherited]

Definition at line 1203 of file TextString.cpp.

  {
    size_t start = FindLastOccurence (SplitString);

    if (start != tstring::npos)
    {
      size_t size = StringLength (SplitString);
      Left = GetSubString (0, start);
      Right = GetSubString (start + size, Length() - (start + size) );
    }
    else
    {
      Left = *this;
      Right = "";
    }
  }

Here is the call graph for this function:

Here is the caller graph for this function:

void nux::NString::SplitAtLastOccurenceOf ( const TCHAR SplitChar,
NString Left,
NString Right 
) [inherited]

Definition at line 1220 of file TextString.cpp.

  {
    SplitAtLastOccurenceOf (NString (SplitChar), Left, Right);
  }

Here is the call graph for this function:

void nux::NString::SplitAtLastOccurenceOf ( const NString SplitString,
NString Left,
NString Right 
) [inherited]

Definition at line 1225 of file TextString.cpp.

  {
    SplitAtLastOccurenceOf (SplitString.GetTCharPtr(), Left, Right);
  }

Here is the call graph for this function:

NString nux::NString::Trim ( ) const [inherited]

Trims all leading and trailing whitespace characters from the string.

Definition at line 1016 of file TextString.cpp.

  {
    return TrimLeft().TrimRight();
  }

Here is the call graph for this function:

Here is the caller graph for this function:

NString nux::NString::TrimLeft ( ) const [inherited]

Trim the white space characters at the start of this string. Return a trimmed NString.

Definition at line 1021 of file TextString.cpp.

  {
    size_t n = 0;
    size_t L = Length() - 1;

    while (n <= L)
    {
      if (IsWhitespaceChar (m_string[n]) )
      {
        n++;
      }
      else
      {
        break;
      }
    }

    return GetSubString (n, Length() - n);
  }

Here is the call graph for this function:

Here is the caller graph for this function:

NString nux::NString::TrimLeft ( NString  str) const [inherited]

Trim any of the characters in the argument string. Return a trimmed NString.

Definition at line 1060 of file TextString.cpp.

  {
    size_t n = 0;
    size_t L = Length();

    if (L == 0)
      return *this;

    while (n < L)
    {
      bool trim = false;
      size_t sz = str.Length();

      for (size_t i = 0; i < sz; i++)
      {
        if (m_string[n] == str[i])
        {
          trim = true;
          break;
        }
      }

      if (trim)
      {
        n++;
      }
      else
      {
        break;
      }
    }

    return GetSubString (n, Length() - n);
  }

Here is the call graph for this function:

NString nux::NString::TrimRight ( ) const [inherited]

Trim the white space characters at the end of this string. Return a trimmed NString.

Definition at line 1041 of file TextString.cpp.

  {
    size_t L = Length() - 1;

    while (0 <= L)
    {
      if (IsWhitespaceChar (m_string[L]) )
      {
        L--;
      }
      else
      {
        break;
      }
    }

    return GetSubString (0, Length() + 1);
  }

Here is the call graph for this function:

Here is the caller graph for this function:

NString nux::NString::TrimRight ( NString  str) const [inherited]

Trim any of the characters in the argument string. Return a trimmed NString.

Definition at line 1095 of file TextString.cpp.

  {
    size_t L = Length();

    if (L == 0)
      return *this;

    L = L - 1;

    while (0 <= L)
    {
      bool trim = false;
      size_t sz = str.Length();

      for (size_t i = 0; i < sz; i++)
      {
        if (m_string[L] == str[i])
        {
          trim = true;
          break;
        }
      }

      if (trim)
      {
        L--;
      }
      else
      {
        break;
      }
    }

    return GetSubString (0, L + 1);
  }

Here is the call graph for this function:

nux::NString::VARARG_DECL ( static  NString,
static  NString,
return  ,
Printf  ,
VARARG_NONE  ,
const TCHAR ,
VARARG_NONE  ,
VARARG_NONE   
) [inherited]

Behave like printf.

Use an internal buffer of 1024 characters. Do not use this function if you are expecting the result to be more that 1024-1 characters.

Returns:
A string with formated arguments in a NString.

Friends And Related Function Documentation

bool operator!= ( const NString left,
const NString right 
) [friend, inherited]

Definition at line 1273 of file TextString.cpp.

  {
    return left.m_string != right.m_string;
  }
NString operator+ ( const NString left,
const NString right 
) [friend, inherited]

Definition at line 1298 of file TextString.cpp.

  {
    return NString (left.m_string + right.m_string);
  }
NString operator+ ( const NString left,
const TCHAR right 
) [friend, inherited]

Definition at line 1303 of file TextString.cpp.

  {
    return NString (left.m_string + right);
  }
NString operator+ ( const NString left,
const TCHAR  right 
) [friend, inherited]

Definition at line 1308 of file TextString.cpp.

  {
    return NString (left.m_string + right);
  }
NString operator+ ( const TCHAR left,
const NString right 
) [friend, inherited]

Definition at line 1313 of file TextString.cpp.

  {
    return NString (left + right.m_string);
  }
NString operator+ ( const TCHAR  left,
const NString right 
) [friend, inherited]

Definition at line 1318 of file TextString.cpp.

  {
    return NString (left + right.m_string);
  }
bool operator< ( const NString left,
const NString right 
) [friend, inherited]

Definition at line 1281 of file TextString.cpp.

  {
    return left.m_string < right.m_string;
  }
tostream& operator<< ( tostream o,
const NString s 
) [friend, inherited]

Definition at line 1323 of file TextString.cpp.

  {
    return o << s.m_string;
  }
bool operator<= ( const NString left,
const NString right 
) [friend, inherited]

Definition at line 1285 of file TextString.cpp.

  {
    return left.m_string <= right.m_string;
  }
bool operator== ( const NString left,
const NString right 
) [friend, inherited]

Definition at line 1277 of file TextString.cpp.

  {
    return left.m_string == right.m_string;
  }
bool operator> ( const NString left,
const NString right 
) [friend, inherited]

Definition at line 1289 of file TextString.cpp.

  {
    return left.m_string > right.m_string;
  }
bool operator>= ( const NString left,
const NString right 
) [friend, inherited]

Definition at line 1293 of file TextString.cpp.

  {
    return left.m_string >= right.m_string;
  }

Member Data Documentation

Definition at line 873 of file TextString.h.


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