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

FX::FXWString Class Reference

#include <FXWString.h>

List of all members.

Public Methods

 FXWString ()
 Create empty string.

 FXWString (const FXWString &s)
 Copy construct.

 FXWString (const FXwchar *s)
 Construct and init.

 FXWString (const FXwchar *s, FXint n)
 Construct and init with substring.

 FXWString (FXwchar c, FXint n)
 Construct and fill with constant.

 FXWString (const FXwchar *s1, const FXwchar *s2)
 Construct string from two parts.

void length (FXint len)
 Change the length of the string to len.

FXint length () const
 Length of text.

const FXwchar * text () const
 Get text contents.

FXbool empty () const
 See if string is empty.

FXwchar & operator[] (FXint i)
 Return a non-const reference to the ith character.

const FXwchar & operator[] (FXint i) const
 Return a const reference to the ith character.

FXWString & operator= (const FXWString &s)
 Assign another string to this.

FXWString & operator= (const FXwchar *s)
 Assign a C-style string to this.

FXWString & fill (FXwchar c, FXint n)
 Fill with a constant.

FXWString & fill (FXwchar c)
 Fill up to current length.

FXWString & lower ()
 Convert to lower case.

FXWString & upper ()
 Convert to upper case.

FXWString section (FXwchar delim, FXint start, FXint num=1) const
 Return num partition(s) of string separated by delimiter delim.

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 section (const FXwchar *delim, FXint start, FXint num=1) const
 Return num partition(s) of string separated by delimiters in delim.

FXWString section (const FXWString &delim, FXint start, FXint num=1) const
 Return num partition(s) of string separated by delimiters in delim.

FXWString & assign (FXwchar c)
 Assign character c to this string.

FXWString & assign (FXwchar c, FXint n)
 Assign n characters c to this string.

FXWString & assign (const FXwchar *s, FXint n)
 Assign first n characters of string s to this string.

FXWString & assign (const FXWString &s)
 Assign string s to this string.

FXWString & assign (const FXwchar *s)
 Assign string s to this string.

FXWString & insert (FXint pos, FXwchar c)
 Insert character at specified position.

FXWString & insert (FXint pos, FXwchar c, FXint n)
 Insert n characters c at specified position.

FXWString & insert (FXint pos, const FXwchar *s, FXint n)
 Insert first n characters of string at specified position.

FXWString & insert (FXint pos, const FXWString &s)
 Insert string at specified position.

FXWString & insert (FXint pos, const FXwchar *s)
 Insert string at specified position.

FXWString & prepend (FXwchar c)
 Prepend string with input character.

FXWString & prepend (FXwchar c, FXint n)
 Prepend string with n characters c.

FXWString & prepend (const FXwchar *s, FXint n)
 Prepend string with first n characters of input string.

FXWString & prepend (const FXWString &s)
 Prepend string with input string.

FXWString & prepend (const FXwchar *s)
 Prepend string with input string.

FXWString & append (FXwchar c)
 Append input character to this string.

FXWString & append (FXwchar c, FXint n)
 Append input n characters c to this string.

FXWString & append (const FXwchar *s, FXint n)
 Append first n characters of input string to this string.

FXWString & append (const FXWString &s)
 Append input string to this string.

FXWString & append (const FXwchar *s)
 Append input string to this string.

FXWString & replace (FXint pos, FXwchar c)
 Replace a single character.

FXWString & replace (FXint pos, FXint m, FXwchar c, FXint n)
 Replace the m characters at pos with n characters c.

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 & replace (FXint pos, FXint m, const FXWString &s)
 Replace the m characters at pos with input string.

FXWString & replace (FXint pos, FXint m, const FXwchar *s)
 Replace the m characters at pos with input string.

FXWString & remove (FXint pos, FXint n=1)
 Remove substring.

FXWString & substitute (FXwchar orig, FXwchar sub)
 Substitute one character by another.

FXWString & simplify ()
 Simplify whitespace in string.

FXWString & trim ()
 Remove leading and trailing whitespace.

FXWString & trimBegin ()
 Remove leading whitespace.

FXWString & trimEnd ()
 Remove trailing whitespace.

FXWString & trunc (FXint pos)
 Truncate string at pos.

FXWString & clear ()
 Clear.

FXWString left (FXint n) const
 Get leftmost part.

FXWString right (FXint n) const
 Get rightmost part.

FXWString mid (FXint pos, FXint n) const
 Get some part in the middle.

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
 Find a character, searching forward; return position or -1.

FXint rfind (FXwchar c, FXint pos=2147483647) const
 Find a character, searching backward; return position or -1.

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
 Find a substring of length n, searching forward; return position or -1.

FXint rfind (const FXwchar *substr, FXint n, FXint pos) const
 Find a substring of length n, searching backward; return position or -1.

FXint find (const FXwchar *substr, FXint pos=0) const
 Find a substring, searching forward; return position or -1.

FXint rfind (const FXwchar *substr, FXint pos=2147483647) const
 Find a substring, searching backward; return position or -1.

FXint find (const FXWString &substr, FXint pos=0) const
 Find a substring, searching forward; return position or -1.

FXint rfind (const FXWString &substr, FXint pos=2147483647) const
 Find a substring, searching backward; return position or -1.

FXint 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 find_first_of (const FXwchar *set, FXint pos=0) const
 Find first character in the set, starting from pos; return position or -1.

FXint find_first_of (const FXWString &set, FXint pos=0) const
 Find first character in the set, starting from pos; return position or -1.

FXint find_first_of (FXwchar c, FXint pos=0) const
 Find first character, starting from pos; return position or -1.

FXint 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 find_last_of (const FXwchar *set, FXint pos=2147483647) const
 Find last character in the set, starting from pos; return position or -1.

FXint find_last_of (const FXWString &set, FXint pos=2147483647) const
 Find last character in the set, starting from pos; return position or -1.

FXint find_last_of (FXwchar c, FXint pos=0) const
 Find last character, starting from pos; return position or -1.

FXint 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 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 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 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 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 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 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 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 count (FXwchar c) const
 Find number of occurances of character in string.

FXuint hash () const
 Get hash value.

FXWString & operator+= (const FXWString &s)
 Append operators.

FXWString & operator+= (const FXwchar *s)
FXWString & operator+= (FXwchar c)
 ~FXWString ()
 Delete.


Static Public Attributes

const FXwchar null [] = {0,0,0,0}
const FXwchar hex [17] = {'0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f',0}
const FXwchar HEX [17] = {'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F',0}

Friends

FXAPI FXint compare (const FXwchar *s1, const FXwchar *s2)
 Compare.

FXAPI FXint compare (const FXwchar *s1, const FXWString &s2)
FXAPI FXint compare (const FXWString &s1, const FXwchar *s2)
FXAPI FXint compare (const FXWString &s1, const FXWString &s2)
FXAPI FXint compare (const FXwchar *s1, const FXwchar *s2, FXint n)
 Compare up to n.

FXAPI FXint compare (const FXwchar *s1, const FXWString &s2, FXint n)
FXAPI FXint compare (const FXWString &s1, const FXwchar *s2, FXint n)
FXAPI FXint compare (const FXWString &s1, const FXWString &s2, FXint n)
FXAPI FXint comparecase (const FXwchar *s1, const FXwchar *s2)
 Compare case insensitive.

FXAPI FXint comparecase (const FXwchar *s1, const FXWString &s2)
FXAPI FXint comparecase (const FXWString &s1, const FXwchar *s2)
FXAPI FXint comparecase (const FXWString &s1, const FXWString &s2)
FXAPI FXint comparecase (const FXwchar *s1, const FXwchar *s2, FXint n)
 Compare case insensitive up to n.

FXAPI FXint comparecase (const FXwchar *s1, const FXWString &s2, FXint n)
FXAPI FXint comparecase (const FXWString &s1, const FXwchar *s2, FXint n)
FXAPI FXint comparecase (const FXWString &s1, const FXWString &s2, FXint n)
FXAPI FXbool operator== (const FXWString &s1, const FXWString &s2)
 Comparison operators.

FXAPI FXbool operator== (const FXWString &s1, const FXwchar *s2)
FXAPI FXbool operator== (const FXwchar *s1, const FXWString &s2)
FXAPI FXbool operator!= (const FXWString &s1, const FXWString &s2)
FXAPI FXbool operator!= (const FXWString &s1, const FXwchar *s2)
FXAPI FXbool operator!= (const FXwchar *s1, const FXWString &s2)
FXAPI FXbool operator< (const FXWString &s1, const FXWString &s2)
FXAPI FXbool operator< (const FXWString &s1, const FXwchar *s2)
FXAPI FXbool operator< (const FXwchar *s1, const FXWString &s2)
FXAPI FXbool operator<= (const FXWString &s1, const FXWString &s2)
FXAPI FXbool operator<= (const FXWString &s1, const FXwchar *s2)
FXAPI FXbool operator<= (const FXwchar *s1, const FXWString &s2)
FXAPI FXbool operator> (const FXWString &s1, const FXWString &s2)
FXAPI FXbool operator> (const FXWString &s1, const FXwchar *s2)
FXAPI FXbool operator> (const FXwchar *s1, const FXWString &s2)
FXAPI FXbool operator>= (const FXWString &s1, const FXWString &s2)
FXAPI FXbool operator>= (const FXWString &s1, const FXwchar *s2)
FXAPI FXbool operator>= (const FXwchar *s1, const FXWString &s2)
FXAPI FXWString operator+ (const FXWString &s1, const FXWString &s2)
 Concatenate two strings.

FXAPI FXWString operator+ (const FXWString &s1, const FXwchar *s2)
FXAPI FXWString operator+ (const FXwchar *s1, const FXWString &s2)
FXAPI FXWString operator+ (const FXWString &s, FXwchar c)
 Concatenate with single character.

FXAPI FXWString operator+ (FXwchar c, const FXWString &s)
FXAPI FXStreamoperator<< (FXStream &store, const FXWString &s)
 Saving to a stream.

FXAPI FXStreamoperator>> (FXStream &store, FXWString &s)
 Load from a stream.

FXAPI void swap (FXWString &a, FXWString &b)
 Swap two strings.


Detailed Description

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


Member Function Documentation

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.


Friends And Related Function Documentation

FXAPI void swap FXWString &    a,
FXWString &    b
[friend]
 

Convert real number to a string, using the given procision and exponential notation mode, which may be FALSE (never), TRUE (always), or MAYBE (when needed).