Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members

FX::FXWString Class Reference

FXWString provides a "wide" string class suitable for storing Unicode strings. More...

#include <FXWString.h>

List of all members.

Public Member Functions

 FXWString ()
 FXWString (const FXWString &s)
 FXWString (const FXwchar *s)
 FXWString (const FXwchar *s, FXint n)
 FXWString (FXwchar c, FXint n)
 FXWString (const FXwchar *s1, const FXwchar *s2)
void length (FXint len)
FXint length () const
const FXwchar * text () const
FXbool empty () const
FXwchar & operator[] (FXint i)
const FXwchar & operator[] (FXint i) const
FXWStringoperator= (const FXWString &s)
FXWStringoperator= (const FXwchar *s)
FXWStringfill (FXwchar c, FXint n)
FXWStringfill (FXwchar c)
FXWStringlower ()
FXWStringupper ()
FXWString section (FXwchar delim, FXint start, FXint num=1) const
FXWString section (const FXwchar *delim, FXint n, FXint start, FXint num=1) const
FXWString section (const FXwchar *delim, FXint start, FXint num=1) const
FXWString section (const FXWString &delim, FXint start, FXint num=1) const
FXWStringassign (FXwchar c)
FXWStringassign (FXwchar c, FXint n)
FXWStringassign (const FXwchar *s, FXint n)
FXWStringassign (const FXWString &s)
FXWStringassign (const FXwchar *s)
FXWStringinsert (FXint pos, FXwchar c)
FXWStringinsert (FXint pos, FXwchar c, FXint n)
FXWStringinsert (FXint pos, const FXwchar *s, FXint n)
FXWStringinsert (FXint pos, const FXWString &s)
FXWStringinsert (FXint pos, const FXwchar *s)
FXWStringprepend (FXwchar c)
FXWStringprepend (FXwchar c, FXint n)
FXWStringprepend (const FXwchar *s, FXint n)
FXWStringprepend (const FXWString &s)
FXWStringprepend (const FXwchar *s)
FXWStringappend (FXwchar c)
FXWStringappend (FXwchar c, FXint n)
FXWStringappend (const FXwchar *s, FXint n)
FXWStringappend (const FXWString &s)
FXWStringappend (const FXwchar *s)
FXWStringreplace (FXint pos, FXwchar c)
FXWStringreplace (FXint pos, FXint m, FXwchar c, FXint n)
FXWStringreplace (FXint pos, FXint m, const FXwchar *s, FXint n)
FXWStringreplace (FXint pos, FXint m, const FXWString &s)
FXWStringreplace (FXint pos, FXint m, const FXwchar *s)
FXWStringremove (FXint pos, FXint n=1)
FXint contains (FXwchar ch)
FXint contains (const FXwchar *sub, FXint n)
FXint contains (const FXwchar *sub)
FXint contains (const FXWString &sub)
FXWStringsubstitute (FXwchar org, FXwchar sub, FXbool all=TRUE)
FXWStringsubstitute (const FXwchar *org, FXint olen, const FXwchar *rep, FXint rlen, FXbool all=TRUE)
FXWStringsubstitute (const FXwchar *org, const FXwchar *rep, FXbool all=TRUE)
FXWStringsubstitute (const FXWString &org, const FXWString &rep, FXbool all=TRUE)
FXWStringsimplify ()
FXWStringtrim ()
FXWStringtrimBegin ()
FXWStringtrimEnd ()
FXWStringtrunc (FXint pos)
FXWStringclear ()
FXWString left (FXint n) const
FXWString right (FXint n) const
FXWString mid (FXint pos, FXint n) const
FXWString before (FXwchar ch, FXint n=1) const
FXWString rbefore (FXwchar ch, FXint n=1) const
FXWString after (FXwchar ch, FXint n=1) const
FXWString rafter (FXwchar ch, FXint n=1) const
FXint find (FXwchar c, FXint pos=0) const
FXint rfind (FXwchar c, FXint pos=2147483647) const
FXint find (FXwchar c, FXint pos, FXint n) const
FXint rfind (FXwchar c, FXint pos, FXint n) const
FXint find (const FXwchar *substr, FXint n, FXint pos) const
FXint rfind (const FXwchar *substr, FXint n, FXint pos) const
FXint find (const FXwchar *substr, FXint pos=0) const
FXint rfind (const FXwchar *substr, FXint pos=2147483647) const
FXint find (const FXWString &substr, FXint pos=0) const
FXint rfind (const FXWString &substr, FXint pos=2147483647) const
FXint find_first_of (const FXwchar *set, FXint n, FXint pos) const
FXint find_first_of (const FXwchar *set, FXint pos=0) const
FXint find_first_of (const FXWString &set, FXint pos=0) const
FXint find_first_of (FXwchar c, FXint pos=0) const
FXint find_last_of (const FXwchar *set, FXint n, FXint pos) const
FXint find_last_of (const FXwchar *set, FXint pos=2147483647) const
FXint find_last_of (const FXWString &set, FXint pos=2147483647) const
FXint find_last_of (FXwchar c, FXint pos=0) const
FXint find_first_not_of (const FXwchar *set, FXint n, FXint pos) const
FXint find_first_not_of (const FXwchar *set, FXint pos=0) const
FXint find_first_not_of (const FXWString &set, FXint pos=0) const
FXint find_first_not_of (FXwchar c, FXint pos=0) const
FXint find_last_not_of (const FXwchar *set, FXint n, FXint pos) const
FXint find_last_not_of (const FXwchar *set, FXint pos=2147483647) const
FXint find_last_not_of (const FXWString &set, FXint pos=2147483647) const
FXint find_last_not_of (FXwchar c, FXint pos=0) const
FXint count (FXwchar c) const
FXuint hash () const
FXWStringoperator+= (const FXWString &s)
FXWStringoperator+= (const FXwchar *s)
FXWStringoperator+= (FXwchar c)
 ~FXWString ()

Static Public Attributes

const FXwchar null []
const FXwchar hex [17]
const FXwchar HEX [17]

Friends

FXint compare (const FXwchar *s1, const FXwchar *s2)
FXint compare (const FXwchar *s1, const FXWString &s2)
FXint compare (const FXWString &s1, const FXwchar *s2)
FXint compare (const FXWString &s1, const FXWString &s2)
FXint compare (const FXwchar *s1, const FXwchar *s2, FXint n)
FXint compare (const FXwchar *s1, const FXWString &s2, FXint n)
FXint compare (const FXWString &s1, const FXwchar *s2, FXint n)
FXint compare (const FXWString &s1, const FXWString &s2, FXint n)
FXint comparecase (const FXwchar *s1, const FXwchar *s2)
FXint comparecase (const FXwchar *s1, const FXWString &s2)
FXint comparecase (const FXWString &s1, const FXwchar *s2)
FXint comparecase (const FXWString &s1, const FXWString &s2)
FXint comparecase (const FXwchar *s1, const FXwchar *s2, FXint n)
FXint comparecase (const FXwchar *s1, const FXWString &s2, FXint n)
FXint comparecase (const FXWString &s1, const FXwchar *s2, FXint n)
FXint comparecase (const FXWString &s1, const FXWString &s2, FXint n)
FXbool operator== (const FXWString &s1, const FXWString &s2)
FXbool operator== (const FXWString &s1, const FXwchar *s2)
FXbool operator== (const FXwchar *s1, const FXWString &s2)
FXbool operator!= (const FXWString &s1, const FXWString &s2)
FXbool operator!= (const FXWString &s1, const FXwchar *s2)
FXbool operator!= (const FXwchar *s1, const FXWString &s2)
FXbool operator< (const FXWString &s1, const FXWString &s2)
FXbool operator< (const FXWString &s1, const FXwchar *s2)
FXbool operator< (const FXwchar *s1, const FXWString &s2)
FXbool operator<= (const FXWString &s1, const FXWString &s2)
FXbool operator<= (const FXWString &s1, const FXwchar *s2)
FXbool operator<= (const FXwchar *s1, const FXWString &s2)
FXbool operator> (const FXWString &s1, const FXWString &s2)
FXbool operator> (const FXWString &s1, const FXwchar *s2)
FXbool operator> (const FXwchar *s1, const FXWString &s2)
FXbool operator>= (const FXWString &s1, const FXWString &s2)
FXbool operator>= (const FXWString &s1, const FXwchar *s2)
FXbool operator>= (const FXwchar *s1, const FXWString &s2)
FXWString operator+ (const FXWString &s1, const FXWString &s2)
FXWString operator+ (const FXWString &s1, const FXwchar *s2)
FXWString operator+ (const FXwchar *s1, const FXWString &s2)
FXWString operator+ (const FXWString &s, FXwchar c)
FXWString operator+ (FXwchar c, const FXWString &s)
FXStreamoperator<< (FXStream &store, const FXWString &s)
FXStreamoperator>> (FXStream &store, FXWString &s)
void swap (FXWString &a, FXWString &b)


Detailed Description

FXWString provides a "wide" string class suitable for storing Unicode strings.


Constructor & Destructor Documentation

FX::FXWString::FXWString  ) 
 

Create empty string.

FX::FXWString::FXWString const FXWString s  ) 
 

Copy construct.

FX::FXWString::FXWString const FXwchar *  s  ) 
 

Construct and init.

FX::FXWString::FXWString const FXwchar *  s,
FXint  n
 

Construct and init with substring.

FX::FXWString::FXWString FXwchar  c,
FXint  n
 

Construct and fill with constant.

FX::FXWString::FXWString const FXwchar *  s1,
const FXwchar *  s2
 

Construct string from two parts.

FX::FXWString::~FXWString  ) 
 

Delete.


Member Function Documentation

void FX::FXWString::length FXint  len  ) 
 

Change the length of the string to len.

FXint FX::FXWString::length  )  const [inline]
 

Length of text.

const FXwchar* FX::FXWString::text  )  const [inline]
 

Get text contents.

FXbool FX::FXWString::empty  )  const [inline]
 

See if string is empty.

FXwchar& FX::FXWString::operator[] FXint  i  )  [inline]
 

Return a non-const reference to the ith character.

const FXwchar& FX::FXWString::operator[] FXint  i  )  const [inline]
 

Return a const reference to the ith character.

FXWString& FX::FXWString::operator= const FXWString s  ) 
 

Assign another string to this.

FXWString& FX::FXWString::operator= const FXwchar *  s  ) 
 

Assign a C-style string to this.

FXWString& FX::FXWString::fill FXwchar  c,
FXint  n
 

Fill with a constant.

FXWString& FX::FXWString::fill FXwchar  c  ) 
 

Fill up to current length.

FXWString& FX::FXWString::lower  ) 
 

Convert to lower case.

FXWString& FX::FXWString::upper  ) 
 

Convert to upper case.

FXWString FX::FXWString::section FXwchar  delim,
FXint  start,
FXint  num = 1
const
 

Return num partition(s) of string separated by delimiter delim.

FXWString FX::FXWString::section const FXwchar *  delim,
FXint  n,
FXint  start,
FXint  num = 1
const
 

Return num partition(s) of string separated by delimiters in delim.

FXWString FX::FXWString::section const FXwchar *  delim,
FXint  start,
FXint  num = 1
const
 

Return num partition(s) of string separated by delimiters in delim.

FXWString FX::FXWString::section const FXWString delim,
FXint  start,
FXint  num = 1
const
 

Return num partition(s) of string separated by delimiters in delim.

FXWString& FX::FXWString::assign FXwchar  c  ) 
 

Assign character c to this string.

FXWString& FX::FXWString::assign FXwchar  c,
FXint  n
 

Assign n characters c to this string.

FXWString& FX::FXWString::assign const FXwchar *  s,
FXint  n
 

Assign first n characters of string s to this string.

FXWString& FX::FXWString::assign const FXWString s  ) 
 

Assign string s to this string.

FXWString& FX::FXWString::assign const FXwchar *  s  ) 
 

Assign string s to this string.

FXWString& FX::FXWString::insert FXint  pos,
FXwchar  c
 

Insert character at specified position.

FXWString& FX::FXWString::insert FXint  pos,
FXwchar  c,
FXint  n
 

Insert n characters c at specified position.

FXWString& FX::FXWString::insert FXint  pos,
const FXwchar *  s,
FXint  n
 

Insert first n characters of string at specified position.

FXWString& FX::FXWString::insert FXint  pos,
const FXWString s
 

Insert string at specified position.

FXWString& FX::FXWString::insert FXint  pos,
const FXwchar *  s
 

Insert string at specified position.

FXWString& FX::FXWString::prepend FXwchar  c  ) 
 

Prepend string with input character.

FXWString& FX::FXWString::prepend FXwchar  c,
FXint  n
 

Prepend string with n characters c.

FXWString& FX::FXWString::prepend const FXwchar *  s,
FXint  n
 

Prepend string with first n characters of input string.

FXWString& FX::FXWString::prepend const FXWString s  ) 
 

Prepend string with input string.

FXWString& FX::FXWString::prepend const FXwchar *  s  ) 
 

Prepend string with input string.

FXWString& FX::FXWString::append FXwchar  c  ) 
 

Append input character to this string.

FXWString& FX::FXWString::append FXwchar  c,
FXint  n
 

Append input n characters c to this string.

FXWString& FX::FXWString::append const FXwchar *  s,
FXint  n
 

Append first n characters of input string to this string.

FXWString& FX::FXWString::append const FXWString s  ) 
 

Append input string to this string.

FXWString& FX::FXWString::append const FXwchar *  s  ) 
 

Append input string to this string.

FXWString& FX::FXWString::replace FXint  pos,
FXwchar  c
 

Replace a single character.

FXWString& FX::FXWString::replace FXint  pos,
FXint  m,
FXwchar  c,
FXint  n
 

Replace the m characters at pos with n characters c.

FXWString& FX::FXWString::replace FXint  pos,
FXint  m,
const FXwchar *  s,
FXint  n
 

Replaces the m characters at pos with first n characters of input string.

FXWString& FX::FXWString::replace FXint  pos,
FXint  m,
const FXWString s
 

Replace the m characters at pos with input string.

FXWString& FX::FXWString::replace FXint  pos,
FXint  m,
const FXwchar *  s
 

Replace the m characters at pos with input string.

FXWString& FX::FXWString::remove FXint  pos,
FXint  n = 1
 

Remove substring.

FXint FX::FXWString::contains FXwchar  ch  ) 
 

Return number of occurrences of ch in string.

FXint FX::FXWString::contains const FXwchar *  sub,
FXint  n
 

Return number of occurrences of string sub in string.

FXint FX::FXWString::contains const FXwchar *  sub  ) 
 

Return number of occurrences of string sub in string.

FXint FX::FXWString::contains const FXWString sub  ) 
 

Return number of occurrences of string sub in string.

FXWString& FX::FXWString::substitute FXwchar  org,
FXwchar  sub,
FXbool  all = TRUE
 

Substitute one character by another.

FXWString& FX::FXWString::substitute const FXwchar *  org,
FXint  olen,
const FXwchar *  rep,
FXint  rlen,
FXbool  all = TRUE
 

Substitute one string by another.

FXWString& FX::FXWString::substitute const FXwchar *  org,
const FXwchar *  rep,
FXbool  all = TRUE
 

Substitute one string by another.

FXWString& FX::FXWString::substitute const FXWString org,
const FXWString rep,
FXbool  all = TRUE
 

Substitute one string by another.

FXWString& FX::FXWString::simplify  ) 
 

Simplify whitespace in string.

FXWString& FX::FXWString::trim  ) 
 

Remove leading and trailing whitespace.

FXWString& FX::FXWString::trimBegin  ) 
 

Remove leading whitespace.

FXWString& FX::FXWString::trimEnd  ) 
 

Remove trailing whitespace.

FXWString& FX::FXWString::trunc FXint  pos  ) 
 

Truncate string at pos.

FXWString& FX::FXWString::clear  ) 
 

Clear.

FXWString FX::FXWString::left FXint  n  )  const
 

Get leftmost part.

FXWString FX::FXWString::right FXint  n  )  const
 

Get rightmost part.

FXWString FX::FXWString::mid FXint  pos,
FXint  n
const
 

Get some part in the middle.

FXWString FX::FXWString::before FXwchar  ch,
FXint  n = 1
const
 

Return all characters before the n-th occurrence of ch, searching from the beginning of the string.

If the character is not found, return the entire string. If n<=0, return the empty string.

FXWString FX::FXWString::rbefore FXwchar  ch,
FXint  n = 1
const
 

Return all characters before the n-th occurrence of ch, searching from the end of the string.

If the character is not found, return the empty string. If n<=0, return the entire string.

FXWString FX::FXWString::after FXwchar  ch,
FXint  n = 1
const
 

Return all characters after the nth occurrence of ch, searching from the beginning of the string.

If the character is not found, return the empty string. If n<=0, return the entire string.

FXWString FX::FXWString::rafter FXwchar  ch,
FXint  n = 1
const
 

Return all characters after the nth occurrence of ch, searching from the end of the string.

If the character is not found, return the entire string. If n<=0, return the empty string.

FXint FX::FXWString::find FXwchar  c,
FXint  pos = 0
const
 

Find a character, searching forward; return position or -1.

FXint FX::FXWString::rfind FXwchar  c,
FXint  pos = 2147483647
const
 

Find a character, searching backward; return position or -1.

FXint FX::FXWString::find const FXwchar *  substr,
FXint  n,
FXint  pos
const
 

Find a substring of length n, searching forward; return position or -1.

FXint FX::FXWString::rfind const FXwchar *  substr,
FXint  n,
FXint  pos
const
 

Find a substring of length n, searching backward; return position or -1.

FXint FX::FXWString::find const FXwchar *  substr,
FXint  pos = 0
const
 

Find a substring, searching forward; return position or -1.

FXint FX::FXWString::rfind const FXwchar *  substr,
FXint  pos = 2147483647
const
 

Find a substring, searching backward; return position or -1.

FXint FX::FXWString::find const FXWString substr,
FXint  pos = 0
const
 

Find a substring, searching forward; return position or -1.

FXint FX::FXWString::rfind const FXWString substr,
FXint  pos = 2147483647
const
 

Find a substring, searching backward; return position or -1.

FXint FX::FXWString::find_first_of const FXwchar *  set,
FXint  n,
FXint  pos
const
 

Find first character in the set of size n, starting from pos; return position or -1.

FXint FX::FXWString::find_first_of const FXwchar *  set,
FXint  pos = 0
const
 

Find first character in the set, starting from pos; return position or -1.

FXint FX::FXWString::find_first_of const FXWString set,
FXint  pos = 0
const
 

Find first character in the set, starting from pos; return position or -1.

FXint FX::FXWString::find_first_of FXwchar  c,
FXint  pos = 0
const
 

Find first character, starting from pos; return position or -1.

FXint FX::FXWString::find_last_of const FXwchar *  set,
FXint  n,
FXint  pos
const
 

Find last character in the set of size n, starting from pos; return position or -1.

FXint FX::FXWString::find_last_of const FXwchar *  set,
FXint  pos = 2147483647
const
 

Find last character in the set, starting from pos; return position or -1.

FXint FX::FXWString::find_last_of const FXWString set,
FXint  pos = 2147483647
const
 

Find last character in the set, starting from pos; return position or -1.

FXint FX::FXWString::find_last_of FXwchar  c,
FXint  pos = 0
const
 

Find last character, starting from pos; return position or -1.

FXint FX::FXWString::find_first_not_of const FXwchar *  set,
FXint  n,
FXint  pos
const
 

Find first character NOT in the set of size n, starting from pos; return position or -1.

FXint FX::FXWString::find_first_not_of const FXwchar *  set,
FXint  pos = 0
const
 

Find first character NOT in the set, starting from pos; return position or -1.

FXint FX::FXWString::find_first_not_of const FXWString set,
FXint  pos = 0
const
 

Find first character NOT in the set, starting from pos; return position or -1.

FXint FX::FXWString::find_first_not_of FXwchar  c,
FXint  pos = 0
const
 

Find first character NOT equal to c, starting from pos; return position or -1.

FXint FX::FXWString::find_last_not_of const FXwchar *  set,
FXint  n,
FXint  pos
const
 

Find last character NOT in the set of size n, starting from pos; return position or -1.

FXint FX::FXWString::find_last_not_of const FXwchar *  set,
FXint  pos = 2147483647
const
 

Find last character NOT in the set, starting from pos; return position or -1.

FXint FX::FXWString::find_last_not_of const FXWString set,
FXint  pos = 2147483647
const
 

Find last character NOT in the set, starting from pos; return position or -1.

FXint FX::FXWString::find_last_not_of FXwchar  c,
FXint  pos = 0
const
 

Find last character NOT equal to c, starting from pos; return position or -1.

FXint FX::FXWString::count FXwchar  c  )  const
 

Find number of occurrences of character in string.

FXuint FX::FXWString::hash  )  const
 

Get hash value.

FXWString& FX::FXWString::operator+= const FXWString s  ) 
 

Append operators.


Friends And Related Function Documentation

FXint compare const FXwchar *  s1,
const FXwchar *  s2
[friend]
 

Compare.

FXint compare const FXwchar *  s1,
const FXwchar *  s2,
FXint  n
[friend]
 

Compare up to n.

FXint comparecase const FXwchar *  s1,
const FXwchar *  s2
[friend]
 

Compare case insensitive.

FXint comparecase const FXwchar *  s1,
const FXwchar *  s2,
FXint  n
[friend]
 

Compare case insensitive up to n.

FXbool operator== const FXWString s1,
const FXWString s2
[friend]
 

Comparison operators.

FXWString operator+ const FXWString s1,
const FXWString s2
[friend]
 

Concatenate two strings.

FXWString operator+ const FXWString s,
FXwchar  c
[friend]
 

Concatenate with single character.

FXStream& operator<< FXStream store,
const FXWString s
[friend]
 

Saving to a stream.

FXStream& operator>> FXStream store,
FXWString s
[friend]
 

Load from a stream.

void swap FXWString a,
FXWString b
[friend]
 

Swap two strings.

Copyright © 1997-2004 Jeroen van der Zijp