FXString

class FXString

FXString provides essential string manipulation capabilities

Public Methods

[more] FXString()
Create empty string
[more] FXString(const FXString& s)
Copy construct
[more] FXString(const FXchar* s)
Construct and init
[more] FXString(const FXchar* s, FXint n)
Construct and init with substring
[more] FXString(FXchar c, FXint n)
Construct and fill with constant
[more] FXString(const FXchar* s1, const FXchar* s2)
Construct string from two parts
[more]void size(FXint sz)
Size to some desired capacity
[more]FXint size() const
Size of text data, 0 for empty string
[more]FXint length() const
Length of text
[more]const FXchar* text() const
Get text contents
[more]FXbool empty() const
See if string is empty
[more]FXchar& operator[](FXint i)
Return a non-const reference to the ith character
[more]const FXchar& operator[](FXint i) const
Return a const reference to the ith character
[more]FXString& operator=(const FXString& s)
Assign another string to this
[more]FXString& operator=(const FXchar* s)
Assign a C-style string to this
[more]FXString& fill(FXchar c, FXint n)
Fill with a constant
[more]FXString& fill(FXchar c)
Fill up to current length
[more]FXString& lower()
Convert to lower case
[more]FXString& upper()
Convert to upper case
[more]FXString extract(FXint part, FXchar delim) const
Extract partition of delimiter separated string
[more]FXString extract(FXint part, FXchar delim, FXchar esc) const
Extract partition of delimiter separated string
[more]FXString& insert(FXint pos, FXchar c)
Insert character at specified position
[more]FXString& insert(FXint pos, FXchar c, FXint n)
Insert n characters c at specified position
[more]FXString& insert(FXint pos, const FXchar* s, FXint n)
Insert first n characters of string at specified position
[more]FXString& insert(FXint pos, const FXString& s)
Insert string at specified position
[more]FXString& insert(FXint pos, const FXchar* s)
Insert string at specified position
[more]FXString& prepend(FXchar c)
Prepend string with input character
[more]FXString& prepend(FXchar c, FXint n)
Prepend string with n characters c
[more]FXString& prepend(const FXchar* s, FXint n)
Prepend string with first n characters of input string
[more]FXString& prepend(const FXString& s)
Prepend string with input string
[more]FXString& prepend(const FXchar* s)
Prepend string with input string
[more]FXString& append(FXchar c)
Append input character to this string
[more]FXString& append(FXchar c, FXint n)
Append input n characters c to this string
[more]FXString& append(const FXchar* s, FXint n)
Append first n characters of input string to this string
[more]FXString& append(const FXString& s)
Append input string to this string
[more]FXString& append(const FXchar* s)
Append input string to this string
[more]FXString& replace(FXint pos, FXchar c)
Replace a single character
[more]FXString& replace(FXint pos, FXint m, FXchar c, FXint n)
Replace the m characters at pos with n characters c
[more]FXString& replace(FXint pos, FXint m, const FXchar* s, FXint n)
Replaces the m characters at pos with first n characters of input string
[more]FXString& replace(FXint pos, FXint m, const FXString& s)
Replace the m characters at pos with input string
[more]FXString& replace(FXint pos, FXint m, const FXchar* s)
Replace the m characters at pos with input string
[more]FXString& remove(FXint pos, FXint n=1)
Remove substring
[more]FXString& substitute(FXchar orig, FXchar sub)
Substitute one character by another
[more]FXString& trim()
Remove leading and trailing whitespace
[more]FXString& trimBegin()
Remove leading whitespace
[more]FXString& trimEnd()
Remove trailing whitespace
[more]FXString& trunc(FXint pos)
Truncate string at pos
[more]FXString& clear()
Clear
[more]FXString left(FXint n) const
Get leftmost part
[more]FXString right(FXint n) const
Get rightmost part
[more]FXString mid(FXint pos, FXint n) const
Get some part in the middle
[more]FXString before(FXchar ch, FXint n=1) const
Return all characters before the n-th occurrence of ch, counting from the beginning of the string if n>0, or from the end if n<0.
[more]FXString after(FXchar ch, FXint n=1) const
Return all characters after the nth occurrence of ch, counting from the beginning of the string if n>0, or from the end if n<0.
[more]FXint findf(FXchar c, FXint pos=0) const
Find a character, searching forward; return position or -1
[more]FXint findb(FXchar c, FXint pos=2147483647) const
Find a character, searching backward; return position or -1
[more]FXint findf(const FXchar* substr, FXint n, FXint pos) const
Find a substring of length n, searching forward; return position or -1
[more]FXint findb(const FXchar* substr, FXint n, FXint pos) const
Find a substring of length n, searching backward; return position or -1
[more]FXint findf(const FXchar* substr, FXint pos=0) const
Find a substring, searching forward; return position or -1
[more]FXint findb(const FXchar* substr, FXint pos=2147483647) const
Find a substring, searching backward; return position or -1
[more]FXint findf(const FXString &substr, FXint pos=0) const
Find a substring, searching forward; return position or -1
[more]FXint findb(const FXString &substr, FXint pos=2147483647) const
Find a substring, searching backward; return position or -1
[more]FXint count(FXchar c) const
Find number of occurances of character in string
[more]FXString&format (const char *fmt, ...)(2, 3)
Format a string a-la printf
[more]FXintscan (const char *fmt, ...) const (2, 3)
Scan a string a-la scanf
[more]FXint hash() const
Get hash value
[more]FXString& operator+=(const FXString& s)
Append operators
[more] ~FXString()
Delete


Documentation

FXString provides essential string manipulation capabilities
o FXString()
Create empty string

o FXString(const FXString& s)
Copy construct

o FXString(const FXchar* s)
Construct and init

o FXString(const FXchar* s, FXint n)
Construct and init with substring

o FXString(FXchar c, FXint n)
Construct and fill with constant

o FXString(const FXchar* s1, const FXchar* s2)
Construct string from two parts

ovoid size(FXint sz)
Size to some desired capacity

oFXint size() const
Size of text data, 0 for empty string

oFXint length() const
Length of text

oconst FXchar* text() const
Get text contents

oFXbool empty() const
See if string is empty

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

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

oFXString& operator=(const FXString& s)
Assign another string to this

oFXString& operator=(const FXchar* s)
Assign a C-style string to this

oFXString& fill(FXchar c, FXint n)
Fill with a constant

oFXString& fill(FXchar c)
Fill up to current length

oFXString& lower()
Convert to lower case

oFXString& upper()
Convert to upper case

oFXString extract(FXint part, FXchar delim) const
Extract partition of delimiter separated string

oFXString extract(FXint part, FXchar delim, FXchar esc) const
Extract partition of delimiter separated string

oFXString& insert(FXint pos, FXchar c)
Insert character at specified position

oFXString& insert(FXint pos, FXchar c, FXint n)
Insert n characters c at specified position

oFXString& insert(FXint pos, const FXchar* s, FXint n)
Insert first n characters of string at specified position

oFXString& insert(FXint pos, const FXString& s)
Insert string at specified position

oFXString& insert(FXint pos, const FXchar* s)
Insert string at specified position

oFXString& prepend(FXchar c)
Prepend string with input character

oFXString& prepend(FXchar c, FXint n)
Prepend string with n characters c

oFXString& prepend(const FXchar* s, FXint n)
Prepend string with first n characters of input string

oFXString& prepend(const FXString& s)
Prepend string with input string

oFXString& prepend(const FXchar* s)
Prepend string with input string

oFXString& append(FXchar c)
Append input character to this string

oFXString& append(FXchar c, FXint n)
Append input n characters c to this string

oFXString& append(const FXchar* s, FXint n)
Append first n characters of input string to this string

oFXString& append(const FXString& s)
Append input string to this string

oFXString& append(const FXchar* s)
Append input string to this string

oFXString& replace(FXint pos, FXchar c)
Replace a single character

oFXString& replace(FXint pos, FXint m, FXchar c, FXint n)
Replace the m characters at pos with n characters c

oFXString& replace(FXint pos, FXint m, const FXchar* s, FXint n)
Replaces the m characters at pos with first n characters of input string

oFXString& replace(FXint pos, FXint m, const FXString& s)
Replace the m characters at pos with input string

oFXString& replace(FXint pos, FXint m, const FXchar* s)
Replace the m characters at pos with input string

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

oFXString& substitute(FXchar orig, FXchar sub)
Substitute one character by another

oFXString& trim()
Remove leading and trailing whitespace

oFXString& trimBegin()
Remove leading whitespace

oFXString& trimEnd()
Remove trailing whitespace

oFXString& trunc(FXint pos)
Truncate string at pos

oFXString& clear()
Clear

oFXString left(FXint n) const
Get leftmost part

oFXString right(FXint n) const
Get rightmost part

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

oFXString before(FXchar ch, FXint n=1) const
Return all characters before the n-th occurrence of ch, counting from the beginning of the string if n>0, or from the end if n<0. If the character ch is not found, the entire string, or the empty string, is returned, respectively. A NULL string is returned if n==0.

oFXString after(FXchar ch, FXint n=1) const
Return all characters after the nth occurrence of ch, counting from the beginning of the string if n>0, or from the end if n<0. If the character ch is not found, the empty string, or the entire string, is returned, respectively. A NULL string is returned if n==0.

oFXint findf(FXchar c, FXint pos=0) const
Find a character, searching forward; return position or -1

oFXint findb(FXchar c, FXint pos=2147483647) const
Find a character, searching backward; return position or -1

oFXint findf(const FXchar* substr, FXint n, FXint pos) const
Find a substring of length n, searching forward; return position or -1

oFXint findb(const FXchar* substr, FXint n, FXint pos) const
Find a substring of length n, searching backward; return position or -1

oFXint findf(const FXchar* substr, FXint pos=0) const
Find a substring, searching forward; return position or -1

oFXint findb(const FXchar* substr, FXint pos=2147483647) const
Find a substring, searching backward; return position or -1

oFXint findf(const FXString &substr, FXint pos=0) const
Find a substring, searching forward; return position or -1

oFXint findb(const FXString &substr, FXint pos=2147483647) const
Find a substring, searching backward; return position or -1

oFXint count(FXchar c) const
Find number of occurances of character in string

oFXString&format (const char *fmt, ...)(2, 3)
Format a string a-la printf

oFXintscan (const char *fmt, ...) const (2, 3)
Scan a string a-la scanf

oFXint hash() const
Get hash value

oFXString& operator+=(const FXString& s)
Append operators

o ~FXString()
Delete


This class has no child classes.
Friends:
FXint compare(const FXchar *s1,const FXchar *s2)
FXint compare(const FXchar *s1,const FXString &s2)
FXint compare(const FXString &s1,const FXchar *s2)
FXint compare(const FXString &s1,const FXString &s2)
FXint compare(const FXchar *s1,const FXchar *s2,FXint n)
FXint compare(const FXchar *s1,const FXString &s2,FXint n)
FXint compare(const FXString &s1,const FXchar *s2,FXint n)
FXint compare(const FXString &s1,const FXString &s2,FXint n)
FXint comparecase(const FXchar *s1,const FXchar *s2)
FXint comparecase(const FXchar *s1,const FXString &s2)
FXint comparecase(const FXString &s1,const FXchar *s2)
FXint comparecase(const FXString &s1,const FXString &s2)
FXint comparecase(const FXchar *s1,const FXchar *s2,FXint n)
FXint comparecase(const FXchar *s1,const FXString &s2,FXint n)
FXint comparecase(const FXString &s1,const FXchar *s2,FXint n)
FXint comparecase(const FXString &s1,const FXString &s2,FXint n)
FXbool operator==(const FXString &s1,const FXString &s2)
FXbool operator==(const FXString &s1,const FXchar *s2)
FXbool operator==(const FXchar *s1,const FXString &s2)
FXbool operator!=(const FXString &s1,const FXString &s2)
FXbool operator!=(const FXString &s1,const FXchar *s2)
FXbool operator!=(const FXchar *s1,const FXString &s2)
FXbool operator<(const FXString &s1,const FXString &s2)
FXbool operator<(const FXString &s1,const FXchar *s2)
FXbool operator<(const FXchar *s1,const FXString &s2)
FXbool operator<=(const FXString &s1,const FXString &s2)
FXbool operator<=(const FXString &s1,const FXchar *s2)
FXbool operator<=(const FXchar *s1,const FXString &s2)
FXbool operator>(const FXString &s1,const FXString &s2)
FXbool operator>(const FXString &s1,const FXchar *s2)
FXbool operator>(const FXchar *s1,const FXString &s2)
FXbool operator>=(const FXString &s1,const FXString &s2)
FXbool operator>=(const FXString &s1,const FXchar *s2)
FXbool operator>=(const FXchar *s1,const FXString &s2)
FXString operator+(const FXString& s1,const FXString& s2)
FXString operator+(const FXString& s1,const FXchar* s2)
FXString operator+(const FXchar* s1,const FXString& s2)
FXString operator+(const FXString& s,FXchar c)
FXString operator+(FXchar c,const FXString& s)
FXStream& operator<<(FXStream& store,const FXString& s)
FXStream& operator>>(FXStream& store,FXString& s)
FXString FXStringFormat(const FXchar *fmt,...) FX_PRINTF(1,2)
FXString FXStringVFormat(const FXchar *fmt,va_list args)
FXString FXStringVal(FXint num,FXint base=10)
FXString FXStringVal(FXuint num,FXint base=10)
FXString FXStringVal(FXfloat num,FXint prec=6,FXbool exp=MAYBE)
FXString FXStringVal(FXdouble num,FXint prec=6,FXbool exp=MAYBE)
FXint FXIntVal(const FXString& s,FXint base=10)
FXuint FXUIntVal(const FXString& s,FXint base=10)
FXfloat FXFloatVal(const FXString& s)
FXdouble FXDoubleVal(const FXString& s)

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.