![]() ![]() ![]()
|
SophiaFramework UNIVERSE 5.1 |

SFXAnsiString and SFXWideString
In the BREW environment, there are two kinds of character types: the char type that represents single byte character or multi-byte character, and the AECHAR type that represents 2 byte character.
SophiaFramewok defines these two kinds of types as AChar and WChar respectively.
And SophiaFramework provides two kinds of String classes: the SFXAnsiString class for the string of AChar characters and the SFXWideString class for the string of WChar characters.
How to Empty a String
There are two methods to empty a string:
In the former method, its heap is not released. By block allocation support, to allocate new memory is unnecessary when a string is newly created in this heap. Therefore its processing speed is very fast.
In the latter method, its heap is released. Though the released heap is free for other tasks, its processing speed slows down.
Which method to choose depends upon the trade-off between processing speed and memory usage.
Example 805. Method 1: Substitute an empty string or call the SFXAnsiString::SetLength function:
SFXAnsiString str = "The best C++ Programming Environment for BREW"; str = "; // OR: str.SetLength(0); // the heap is not released
Example 806. Method 2: Call the Clear function:
SFXAnsiString str = "The best C++ Programming Environment for BREW";
str.Clear();
// the heap is released
When short strings are frequently processed, the method of calling the SFXAnsiString::SetLength function is more efficient.
SFXAnsiString str; str = "BREW"; ... str.SetLength(0); ... str = "C++"; ... str.SetLength(0); ... str = "GUI"; ... str.SetLength(0); ... str = "XML"; ...
Attach Function and Detach Function
The SFXAnsiString::Attach function function attaches the string area to the SFXAnsiString object. The SFXAnsiString::Detach function has the reverse functionality.
Though the data is copied by using the SFXAnsiString::Set function and the substitution operator(=), while using the SFXAnsiString::Attach function and the SFXAnsiString::Detach function, data will not be copied.
When there is not enough heap for copying a several hundreds KB string, or to avoid the performance deterioration, use these functions.
| Constructor/Destructor |
|---|
|
SFXAnsiString( Void ) Constructor of the SFXAnsiString class.
|
|
SFXAnsiString(
SFXAnsiStringConstRef string
) Constructor of the SFXAnsiString class.
|
|
SFXAnsiString(
SFXWideStringConstRef string
) Constructor of the SFXAnsiString class.
|
|
SFXAnsiString(
ACharConstPtr string
, SInt32 length = -1
) Constructor of the SFXAnsiString class.
|
|
SFXAnsiString(
WCharConstPtr string
, SInt32 length = -1
) Constructor of the SFXAnsiString class.
|
|
SFXAnsiString(
AChar character
) Constructor of the SFXAnsiString class.
|
|
SFXAnsiString(
SFXBufferConstRef buffer
) Constructor of the SFXAnsiString class.
|
|
SFXAnsiString(
UInt16 threshold
, UInt16 cluster
) Constructor of the SFXAnsiString class.
|
|
~SFXAnsiString( Void ) Destructor of the SFXAnsiString class.
|
| Public Functions | |
|---|---|
| SFCError |
Add(
SFXAnsiStringConstRef string
) Add the specified string to the end of the current string.
|
| SFCError |
Add(
ACharConstPtr string
, SInt32 length = -1
) Add the specified string to the end of the current string.
|
| SFCError |
Add(
AChar character
) Add the specified string to the end of the current string.
|
| SFXAnsiString |
AsLower( Void ) Convert the string into lower characters.
|
| SInt32 |
AsSInt32(
SInt32 substitute = 0
) Convert the string into SInt32 type.
|
| UInt32 |
AsUInt32(
UInt32 substitute = 0
) Convert the string into UInt32 type.
|
| SFXAnsiString |
AsUpper( Void ) Convert the string into capital character.
|
| SFCError |
Attach(
SFXAnsiStringPtr string
) Attach the specified string to this string object.
|
| SFCError |
Attach(
ACharPtr string
, SInt32 length = -1
) Attach the specified string to this string object.
|
| SFCError |
Attach(
SFXBufferPtr buffer
) Attach the specified string to this string object.
|
| SFCError |
AttachSFXBuffer(
SFXBufferPtr buffer
) [DEPRECATED]Attach the specified buffer to this string object.
|
| Void |
Clear( Void ) Clear the string.
|
| SInt32 |
Compare(
SFXAnsiStringConstRef string
, Bool sensitive = true
) Compare with a specified string by dictionary order.
|
| SInt32 |
Compare(
ACharConstPtr string
, Bool sensitive = true
) Compare with a specified string by dictionary order.
|
| SFXAnsiString |
Concat(
SFXAnsiStringConstRef string
) Concatenate the specified string to the end of this string and return the result.
|
| SFXAnsiString |
Concat(
ACharConstPtr string
, SInt32 length = -1
) Concatenate the specified string to the end of this string and return the result.
|
| SFXAnsiString |
Concat(
AChar character
) Concatenate the specified string to the end of this string and return the result.
|
| SFCError |
Copy(
SInt32 index
, SFXAnsiStringConstRef string
) Overwrite with a specified string.
|
| SFCError |
Copy(
SInt32 index
, ACharConstPtr string
, SInt32 length = -1
) Overwrite with a specified string.
|
| SFCError |
Detach(
SFXAnsiStringPtr string
) Detach the string area from this string object.
|
| ACharPtr |
Detach(
SInt32Ptr length = null
) Detach the string area from this string object.
|
| SFCError |
Detach(
SFXBufferPtr buffer
) Detach the string area from this string object.
|
| SFCError |
DetachSFXBuffer(
SFXBufferPtr buffer
) [DEPRECATED]Detach the string area from this string object.
|
| static SFXAnsiStringConstRef |
EmptyInstance( Void ) Get an empty string.
|
| Bool |
EndsWith(
SFXAnsiStringConstRef string
, Bool sensitive = true
) Check whether the string ends with a specified string or not.
|
| Bool |
EndsWith(
ACharConstPtr string
, Bool sensitive = true
) Check whether the string ends with a specified string or not.
|
| Bool |
EndsWith(
AChar character
, Bool sensitive = true
) Check whether the string ends with a specified string or not.
|
| Bool |
Equals(
SFXAnsiStringConstRef string
, Bool sensitive = true
) Check whether the string equals a specified string or not.
|
| Bool |
Equals(
ACharConstPtr string
, Bool sensitive = true
) Check whether the string equals a specified string or not.
|
| Void |
Fill(
AChar character
) Fill the string with a specified character.
|
| SInt32 |
FirstIndexOf(
SFXAnsiStringConstRef string
, SInt32 index = SINT32_MINIMUM
, Bool sensitive = true
) Get the first index of SFXAnsiString object to match a specified data, searching from the beginning.
|
| SInt32 |
FirstIndexOf(
ACharConstPtr string
, SInt32 index = SINT32_MINIMUM
, Bool sensitive = true
) Get the first index of SFXAnsiString object to match a specified data, searching from the beginning.
|
| SInt32 |
FirstIndexOf(
AChar character
, SInt32 index = SINT32_MINIMUM
, Bool sensitive = true
) Get the first index of SFXAnsiString object to match a specified data, searching from the beginning.
|
| static SFXAnsiString |
Format(
va_ref< SFXAnsiStringConst > format
, ...
) Create a string by using the format.
|
| static SFXAnsiString |
Format(
va_ref< SFXWideStringConst > format
, ...
) Create a string by using the format.
|
| static SFXAnsiString |
Format(
ACharConstPtr format
, ...
) Create a string by using the format.
|
| static SFXAnsiString |
Format(
WCharConstPtr format
, ...
) Create a string by using the format.
|
| static SFXAnsiString |
FormatV(
SFXAnsiStringConstRef format
, va_list argument
) Create a string by using the format with a variable-length argument.
|
| static SFXAnsiString |
FormatV(
SFXWideStringConstRef format
, va_list argument
) Create a string by using the format with a variable-length argument.
|
| static SFXAnsiString |
FormatV(
ACharConstPtr format
, va_list argument
) Create a string by using the format with a variable-length argument.
|
| static SFXAnsiString |
FormatV(
WCharConstPtr format
, va_list argument
) Create a string by using the format with a variable-length argument.
|
| ACharPtr |
GetBuffer( Void ) Get the internal buffer of string.
|
| ACharConstPtr |
GetBuffer( Void ) Get the internal buffer of string.
|
| ACharConstPtr |
GetCString( Void ) Get the const pointer to the internal buffer of string. The buffer cannot be updated through this pointer.
|
| AChar |
GetChar(
SInt32 index
) Get the character at a specified index.
|
| UInt16 |
GetCluster( Void ) Get the cluster size of the internal buffer memory. [in bytes]
|
| SInt32 |
GetLength( Void ) Get the length of string.
|
| SInt32 |
GetLengthCString( Void ) Get the length of string until the first null character.
|
| UInt16 |
GetThreshold( Void ) Get the minimum size of the internal buffer memory. [in bytes]
|
| SFXAnsiString |
Insert(
SInt32 index
, SFXAnsiStringConstRef string
) Insert a string or character at a specified index of SFXAnsiString object.
|
| SFXAnsiString |
Insert(
SInt32 index
, ACharConstPtr string
, SInt32 length = -1
) Insert a string or character at a specified index of SFXAnsiString object.
|
| SFXAnsiString |
Insert(
SInt32 index
, AChar character
) Insert a string or character at a specified index of SFXAnsiString object.
|
| Bool |
IsAlpha( Void ) Check whether all the characters in the string are alphabetic or not.
|
| Bool |
IsAlphaDigit( Void ) Check whether all the characters in the string are alphanumeric or not.
|
| Bool |
IsAscii( Void ) Check whether all the characters in the string are Ascii or not.
|
| Bool |
IsControl( Void ) Check whether all the characters in the string are control or not.
|
| Bool |
IsDigit( Void ) Check whether all the characters in the string are digit or not.
|
| Bool |
IsEmpty( Void ) Check whether the length of string is 0 or not.
|
| Bool |
IsEmptyCString( Void ) Check whether the first character is a null or not.
|
| Bool |
IsGraph( Void ) Check whether all the characters in the string are graph or not.
|
| Bool |
IsHexDigit( Void ) Check whether all the characters in the string are Hex digit or not.
|
| Bool |
IsLower( Void ) Check whether all the characters in the string are lower or not.
|
| Bool |
IsPrint( Void ) Check whether all the characters in the string are printable or not.
|
| Bool |
IsPunct( Void ) Check whether all the characters in the string are not space nor alphanumeric but printable or not.
|
| Bool |
IsSpace( Void ) Check whether or not all the characters in the string are spaces or line-feed.
|
| Bool |
IsUpper( Void ) Check whether all the characters in the string are capital or not.
|
| Bool |
Isnull( Void ) Check whether all the characters in the string are null or not.
|
| SInt32 |
LastIndexOf(
SFXAnsiStringConstRef string
, SInt32 index = SINT32_MAXIMUM
, Bool sensitive = true
) Get the last index of SFXAnsiString object to match a specified data, searching from the end.
|
| SInt32 |
LastIndexOf(
ACharConstPtr string
, SInt32 index = SINT32_MAXIMUM
, Bool sensitive = true
) Get the last index of SFXAnsiString object to match a specified data, searching from the end.
|
| SInt32 |
LastIndexOf(
AChar character
, SInt32 index = SINT32_MAXIMUM
, Bool sensitive = true
) Get the last index of SFXAnsiString object to match a specified data, searching from the end.
|
| SFCError |
Mul(
SInt32 repeat
) Repeat the string by a specified times.
|
| SFXAnsiString |
Remove(
SInt32 begin
, SInt32 end
) Remove the characters within a specified range.
|
| SFXAnsiString |
Replace(
SFXAnsiStringConstRef fstring
, SFXAnsiStringConstRef tstring
, Bool sensitive = true
) Replace the string.
|
| SFXAnsiString |
Replace(
SFXAnsiStringConstRef fstring
, ACharConstPtr tstring
, Bool sensitive = true
) Replace the string.
|
| SFXAnsiString |
Replace(
SFXAnsiStringConstRef fstring
, ACharConstPtr tstring
, SInt32 tlength
, Bool sensitive = true
) Replace the string.
|
| SFXAnsiString |
Replace(
ACharConstPtr fstring
, SFXAnsiStringConstRef tstring
, Bool sensitive = true
) Replace the string.
|
| SFXAnsiString |
Replace(
ACharConstPtr fstring
, SInt32 flength
, SFXAnsiStringConstRef tstring
, Bool sensitive = true
) Replace the string.
|
| SFXAnsiString |
Replace(
ACharConstPtr fstring
, ACharConstPtr tstring
, Bool sensitive = true
) Replace the string.
|
| SFXAnsiString |
Replace(
ACharConstPtr fstring
, SInt32 flength
, ACharConstPtr tstring
, SInt32 tlength
, Bool sensitive = true
) Replace the string.
|
| SFXAnsiString |
Replace(
SFXAnsiStringConstRef fstring
, AChar tcharacter
, Bool sensitive = true
) Replace the string.
|
| SFXAnsiString |
Replace(
AChar fcharacter
, SFXAnsiStringConstRef tstring
, Bool sensitive = true
) Replace the string.
|
| SFXAnsiString |
Replace(
AChar fcharacter
, AChar tcharacter
, Bool sensitive = true
) Replace the string.
|
| SFXAnsiString |
Replace(
ACharConstPtr fstring
, AChar tcharacter
, Bool sensitive = true
) Replace the string.
|
| SFXAnsiString |
Replace(
ACharConstPtr fstring
, SInt32 flength
, AChar tcharacter
, Bool sensitive = true
) Replace the string.
|
| SFXAnsiString |
Replace(
AChar fcharacter
, ACharConstPtr tstring
, Bool sensitive = true
) Replace the string.
|
| SFXAnsiString |
Replace(
AChar fcharacter
, ACharConstPtr tstring
, SInt32 tlength
, Bool sensitive = true
) Replace the string.
|
| SFCError |
Set(
SFXAnsiStringConstRef string
) Set the string.
|
| SFCError |
Set(
SFXWideStringConstRef string
) Set the string.
|
| SFCError |
Set(
ACharConstPtr string
, SInt32 length = -1
) Set the string.
|
| SFCError |
Set(
WCharConstPtr string
, SInt32 length = -1
) Set the string.
|
| SFCError |
Set(
AChar character
) Set the string.
|
| SFCError |
Set(
SFXBufferConstRef buffer
) Set the string.
|
| SFCError |
SetChar(
SInt32 index
, AChar character
) Set a character at a specified index.
|
| Void |
SetCluster(
UInt16 size
) Set the cluster size of the internal buffer memory. [in bytes]
|
| SFCError |
SetLength(
SInt32 length
) Set the length of string.
|
| Void |
SetThreshold(
UInt16 size
) Set the minimum size of the internal buffer memory. [in bytes]
|
| Bool |
StartsWith(
SFXAnsiStringConstRef string
, Bool sensitive = true
) Check whether the string starts with a specified string or not.
|
| Bool |
StartsWith(
ACharConstPtr string
, Bool sensitive = true
) Check whether the string starts with a specified string or not.
|
| Bool |
StartsWith(
AChar character
, Bool sensitive = true
) Check whether the string starts with a specified string or not.
|
| SFCError |
Sub(
SFXAnsiStringConstRef string
) Delete a specified string from the end of source string.
|
| SFCError |
Sub(
ACharConstPtr string
, SInt32 length = -1
) Delete a specified string from the end of source string.
|
| SFCError |
Sub(
AChar character
) Delete a specified string from the end of source string.
|
| SFXAnsiString |
Substring(
SInt32 begin
, SInt32 end
) Get the sub-string from the source string.
|
| Void |
ToLower( Void ) Convert the string into lower characters.
|
| Void |
ToUpper( Void ) Convert the string into capital characters.
|
| SFXAnsiString |
Trim(
SFXAnsiStringConstRef string
, Bool sensitive = true
) Trim the blank characters or a specified string/character from the beginning and end of source string.
|
| SFXAnsiString |
Trim(
ACharConstPtr string
, Bool sensitive = true
) Trim the blank characters or a specified string/character from the beginning and end of source string.
|
| SFXAnsiString |
Trim(
AChar character
, Bool sensitive = true
) Trim the blank characters or a specified string/character from the beginning and end of source string.
|
| SFXAnsiString |
Trim( Void ) Trim the blank characters or a specified string/character from the beginning and end of source string.
|
| SFXAnsiString |
TrimLeft(
SFXAnsiStringConstRef string
, Bool sensitive = true
) Trim the blank characters or a specified string/character from the beginning of source string.
|
| SFXAnsiString |
TrimLeft(
ACharConstPtr string
, Bool sensitive = true
) Trim the blank characters or a specified string/character from the beginning of source string.
|
| SFXAnsiString |
TrimLeft(
AChar character
, Bool sensitive = true
) Trim the blank characters or a specified string/character from the beginning of source string.
|
| SFXAnsiString |
TrimLeft( Void ) Trim the blank characters or a specified string/character from the beginning of source string.
|
| SFXAnsiString |
TrimRight(
SFXAnsiStringConstRef string
, Bool sensitive = true
) Trim the blank characters or a specified string/character from the end of source string.
|
| SFXAnsiString |
TrimRight(
ACharConstPtr string
, Bool sensitive = true
) Trim the blank characters or a specified string/character from the end of source string.
|
| SFXAnsiString |
TrimRight(
AChar character
, Bool sensitive = true
) Trim the blank characters or a specified string/character from the end of source string.
|
| SFXAnsiString |
TrimRight( Void ) Trim the blank characters or a specified string/character from the end of source string.
|
| SFXAnsiString |
Truncate( Void ) Get the string until the first "null" character.
|
| SFXAnsiStringRef |
operator*=(
SInt32 repeat
) Repeat the string by a specified times.
|
| SFXAnsiStringRef |
operator+=(
SFXAnsiStringConstRef string
) Add string.
|
| SFXAnsiStringRef |
operator+=(
ACharConstPtr string
) Add string.
|
| SFXAnsiStringRef |
operator+=(
AChar character
) Add string.
|
| SFXAnsiStringRef |
operator-=(
SFXAnsiStringConstRef string
) Delete a specified string from the end of source string.
|
| SFXAnsiStringRef |
operator-=(
ACharConstPtr string
) Delete a specified string from the end of source string.
|
| SFXAnsiStringRef |
operator-=(
AChar character
) Delete a specified string from the end of source string.
|
| SFXAnsiStringRef |
operator<<(
SFXAnsiStringRef left
, SFXAnsiStringConstRef right
) Append a string on the end of string.
|
| SFXAnsiStringRef |
operator<<(
SFXAnsiStringRef left
, SFXWideStringConstRef right
) Append a string on the end of string.
|
| SFXAnsiStringRef |
operator<<(
SFXAnsiStringRef left
, ACharConstPtr right
) Append a string on the end of string.
|
| SFXAnsiStringRef |
operator<<(
SFXAnsiStringRef left
, WCharConstPtr right
) Append a string on the end of string.
|
| SFXAnsiStringRef |
operator<<(
SFXAnsiStringRef left
, AChar right
) Append a string on the end of string.
|
| SFXAnsiStringRef |
operator=(
SFXAnsiStringConstRef string
) Substitute the string with a specified string.
|
| SFXAnsiStringRef |
operator=(
SFXWideStringConstRef string
) Substitute the string with a specified string.
|
| SFXAnsiStringRef |
operator=(
ACharConstPtr string
) Substitute the string with a specified string.
|
| SFXAnsiStringRef |
operator=(
WCharConstPtr string
) Substitute the string with a specified string.
|
| ACharRef |
operator[](
SInt32 index
) Get the character at a specified index.
|
| ACharConstRef |
operator[](
SInt32 index
) Get the character at a specified index.
|
| Bool |
operator==(
SFXAnsiStringConstRef left
, SFXAnsiStringConstRef right
) Check the "=" relation.
|
| Bool |
operator==(
SFXAnsiStringConstRef left
, SFXWideStringConstRef right
) Check the "=" relation.
|
| Bool |
operator==(
SFXAnsiStringConstRef left
, ACharConstPtr right
) Check the "=" relation.
|
| Bool |
operator==(
SFXAnsiStringConstRef left
, WCharConstPtr right
) Check the "=" relation.
|
| Bool |
operator==(
ACharConstPtr left
, SFXAnsiStringConstRef right
) Check the "=" relation.
|
| Bool |
operator==(
WCharConstPtr left
, SFXAnsiStringConstRef right
) Check the "=" relation.
|
| Bool |
operator>=(
SFXAnsiStringConstRef left
, SFXAnsiStringConstRef right
) Check the ">=" relation.
|
| Bool |
operator>=(
SFXAnsiStringConstRef left
, SFXWideStringConstRef right
) Check the ">=" relation.
|
| Bool |
operator>=(
SFXAnsiStringConstRef left
, ACharConstPtr right
) Check the ">=" relation.
|
| Bool |
operator>=(
SFXAnsiStringConstRef left
, WCharConstPtr right
) Check the ">=" relation.
|
| Bool |
operator>=(
ACharConstPtr left
, SFXAnsiStringConstRef right
) Check the ">=" relation.
|
| Bool |
operator>=(
WCharConstPtr left
, SFXAnsiStringConstRef right
) Check the ">=" relation.
|
| Bool |
operator>(
SFXAnsiStringConstRef left
, SFXAnsiStringConstRef right
) Check the ">" relation.
|
| Bool |
operator>(
SFXAnsiStringConstRef left
, SFXWideStringConstRef right
) Check the ">" relation.
|
| Bool |
operator>(
SFXAnsiStringConstRef left
, ACharConstPtr right
) Check the ">" relation.
|
| Bool |
operator>(
SFXAnsiStringConstRef left
, WCharConstPtr right
) Check the ">" relation.
|
| Bool |
operator>(
ACharConstPtr left
, SFXAnsiStringConstRef right
) Check the ">" relation.
|
| Bool |
operator>(
WCharConstPtr left
, SFXAnsiStringConstRef right
) Check the ">" relation.
|
| Bool |
operator<=(
SFXAnsiStringConstRef left
, SFXAnsiStringConstRef right
) Check the "<=" relation.
|
| Bool |
operator<=(
SFXAnsiStringConstRef left
, SFXWideStringConstRef right
) Check the "<=" relation.
|
| Bool |
operator<=(
SFXAnsiStringConstRef left
, ACharConstPtr right
) Check the "<=" relation.
|
| Bool |
operator<=(
SFXAnsiStringConstRef left
, WCharConstPtr right
) Check the "<=" relation.
|
| Bool |
operator<=(
ACharConstPtr left
, SFXAnsiStringConstRef right
) Check the "<=" relation.
|
| Bool |
operator<=(
WCharConstPtr left
, SFXAnsiStringConstRef right
) Check the "<=" relation.
|
| Bool |
operator<(
SFXAnsiStringConstRef left
, SFXAnsiStringConstRef right
) Check the "<" relation.
|
| Bool |
operator<(
SFXAnsiStringConstRef left
, SFXWideStringConstRef right
) Check the "<" relation.
|
| Bool |
operator<(
SFXAnsiStringConstRef left
, ACharConstPtr right
) Check the "<" relation.
|
| Bool |
operator<(
SFXAnsiStringConstRef left
, WCharConstPtr right
) Check the "<" relation.
|
| Bool |
operator<(
ACharConstPtr left
, SFXAnsiStringConstRef right
) Check the "<" relation.
|
| Bool |
operator<(
WCharConstPtr left
, SFXAnsiStringConstRef right
) Check the "<" relation.
|
| SFXAnsiString |
operator-(
SFXAnsiStringConstRef left
, SFXAnsiStringConstRef right
) Delete a specified string from the end of left-hand string.
|
| SFXAnsiString |
operator-(
SFXAnsiStringConstRef left
, SFXWideStringConstRef right
) Delete a specified string from the end of left-hand string.
|
| SFXAnsiString |
operator-(
SFXAnsiStringConstRef left
, ACharConstPtr right
) Delete a specified string from the end of left-hand string.
|
| SFXAnsiString |
operator-(
SFXAnsiStringConstRef left
, WCharConstPtr right
) Delete a specified string from the end of left-hand string.
|
| SFXAnsiString |
operator-(
ACharConstPtr left
, SFXAnsiStringConstRef right
) Delete a specified string from the end of left-hand string.
|
| SFXAnsiString |
operator-(
WCharConstPtr left
, SFXAnsiStringConstRef right
) Delete a specified string from the end of left-hand string.
|
| SFXAnsiString |
operator-(
SFXAnsiStringConstRef left
, AChar right
) Delete a specified string from the end of left-hand string.
|
| SFXAnsiString |
operator-(
AChar left
, SFXAnsiStringConstRef right
) Delete a specified string from the end of left-hand string.
|
| SFXAnsiString |
operator*(
SFXAnsiStringConstRef left
, SInt32 right
) Repeat the string by a specified times.
|
| Bool |
operator!=(
SFXAnsiStringConstRef left
, SFXAnsiStringConstRef right
) Check the "!=" relation.
|
| Bool |
operator!=(
SFXAnsiStringConstRef left
, SFXWideStringConstRef right
) Check the "!=" relation.
|
| Bool |
operator!=(
SFXAnsiStringConstRef left
, ACharConstPtr right
) Check the "!=" relation.
|
| Bool |
operator!=(
SFXAnsiStringConstRef left
, WCharConstPtr right
) Check the "!=" relation.
|
| Bool |
operator!=(
ACharConstPtr left
, SFXAnsiStringConstRef right
) Check the "!=" relation.
|
| Bool |
operator!=(
WCharConstPtr left
, SFXAnsiStringConstRef right
) Check the "!=" relation.
|
| SFXAnsiString |
operator+(
SFXAnsiStringConstRef left
, SFXAnsiStringConstRef right
) Add string.
|
| SFXAnsiString |
operator+(
SFXAnsiStringConstRef left
, SFXWideStringConstRef right
) Add string.
|
| SFXAnsiString |
operator+(
SFXAnsiStringConstRef left
, ACharConstPtr right
) Add string.
|
| SFXAnsiString |
operator+(
SFXAnsiStringConstRef left
, WCharConstPtr right
) Add string.
|
| SFXAnsiString |
operator+(
ACharConstPtr left
, SFXAnsiStringConstRef right
) Add string.
|
| SFXAnsiString |
operator+(
WCharConstPtr left
, SFXAnsiStringConstRef right
) Add string.
|
| SFXAnsiString |
operator+(
SFXAnsiStringConstRef left
, AChar right
) Add string.
|
| SFXAnsiString |
operator+(
AChar left
, SFXAnsiStringConstRef right
) Add string.
|
| Types |
|---|
|
DefaultEnum Constants that represent the default values for the minimum size and the cluster size of the internal buffer memory. [in bytes]
|
[ public, explicit ] SFXAnsiString(Void);
[ public ]
SFXAnsiString(
SFXAnsiStringConstRef string // source string for copying
);
[ public ]
SFXAnsiString(
SFXWideStringConstRef string // source string for copying
);
[ public ]
SFXAnsiString(
ACharConstPtr string // WChar pointer to Source string for copying
SInt32 length = -1 // length of string
);
[ public ]
SFXAnsiString(
WCharConstPtr string // WChar pointer to Source string for copying
SInt32 length = -1 // length of string
);
[ public, explicit ]
SFXAnsiString(
AChar character // AChar string
);
[ public, explicit ]
SFXAnsiString(
SFXBufferConstRef buffer // source buffer for copying
);
[ public, explicit ]
SFXAnsiString(
UInt16 threshold // the mininum value of buffer size
UInt16 cluster // cluster size
);
When the SFXAnsiString class or the SFXWideString class is specified for the constructor of the SFXAnsiString class, the string is copied.
If the pointer of AChar or WChar is specified, it is interpreted and copied as a null-terminated string.
If the length is specified, binary string contains null can be processed, too.
When AChar is specified, only one character is made.
[ public ] ~SFXAnsiString(Void);
The internal string buffer is released.
[ public ] SFCError Add( SFXAnsiStringConstRef string // string to add );
[ public ] SFCError Add( ACharConstPtr string // string to add SInt32 length = -1 // length of the string );
[ public ] SFCError Add( AChar character // character to add );
This function adds the specified string to the end of the current string.
This function influences the content of the current string. If you want to keep it unmodified, use the SFXAnsiString::Concat function.
SFXAnsiString::Concat | SFXAnsiString::Sub | SFXAnsiString::Mul | SFXAnsiString::operator<< | operator+ | SFXAnsiString::operator+=
[ public, const ] SFXAnsiString AsLower(Void);
The source string will not be modified by calling the AsLower() function.
[ public, const ] SInt32 AsSInt32( SInt32 substitute = 0 // the value when the conversion is failed );
If unable to convert, a specified value is returned to substitute.
[ public, const ] UInt32 AsUInt32( UInt32 substitute = 0 // the value when the conversion is failed );
If unable to convert, a specified value is returned to substitute.
[ public, const ] SFXAnsiString AsUpper(Void);
The source string will not be modified by calling the AsUpper() function.
[ public ] SFCError Attach( SFXAnsiStringPtr string // SFXAnsiString string );
[ public ] SFCError Attach( ACharPtr string // AChar string SInt32 length = -1 // length of the string );
[ public ] SFCError Attach( SFXBufferPtr buffer // SFXBuffer buffer );
This function attaches the specified string to this string object. After this function is called, the specified string can be handled as the SFXAnsiString object.
This function is more efficient than the SFXAnsiString::Set function, since the string is not copied and the problem on insufficient memory or performance deterioration can be avoided.
![]() |
Note |
|---|---|
| When this string object is released, the specified string will be released automatically together with this string object. | |
SFXAnsiString string; ACharPtr char_ptr; // allocate the 10240-byte string area to char_ptr char_ptr = static_cast<ACharPtr>(MemoryAllocate(10240)); ... // attach the allocated char_ptr area to the string object string.Attach(char_ptr, 10240); // hereafter, the allocated char_ptr area can be handled as the string object ・・・ // after used, the allocated char_ptr area will be released automatically
[ public ] SFCError AttachSFXBuffer( SFXBufferPtr buffer // buffer );
![]() |
Caution |
|---|---|
| Since this function is deprecated, use the SFXAnsiString::Attach function. | |
[ public ] Void Clear(Void);
It releases the heap.
[ public, const ] SInt32 Compare( SFXAnsiStringConstRef string // string to cpmpare with Bool sensitive = true // case-sensitive or not );
[ public, const ] SInt32 Compare( ACharConstPtr string // string to cpmpare with Bool sensitive = true // case-sensitive or not );
[ public, const ] SFXAnsiString Concat( SFXAnsiStringConstRef string // string to concatenate with );
[ public, const ] SFXAnsiString Concat( ACharConstPtr string // string to concatenate with SInt32 length = -1 // length of the string );
[ public, const ] SFXAnsiString Concat( AChar character // character to concatenate with );
Concatenated string.
This function concatenates the specified string to the end of this string and returns the result.
Different from the SFXAnsiString::Add function, this string will not be modified.
[ public ] SFCError Copy( SInt32 index // starting position to overwrite SFXAnsiStringConstRef string // string to overwrite with );
[ public ] SFCError Copy( SInt32 index // starting position to overwrite ACharConstPtr string // string to overwrite with SInt32 length = -1 // length of the string );
If the string after overwriting exceeds the end of source string, the source string is restored and return SFERR_INVALID_PARAM.
[ public ] SFCError Detach( SFXAnsiStringPtr string // SFXAnsiString string to be detached );
[ public ] ACharPtr Detach( SInt32Ptr length = null // the pointer to the length of the AChar string to be detached );
[ public ] SFCError Detach( SFXBufferPtr buffer // SFXBuffer string to be detached );
Return the string which this string object has in case it is detached to the AChar string. Otherwise, return the SFCError object.
This function is more efficient than the SFXAnsiString::GetChar function, since the string area is not copied and the problem on insufficient memory or performance deterioration can be avoided.
SFXAnsiString string; ACharPtr char_ptr; SInt32 length; string = "The best application for BREW."; ... // detach the string area from this string object and set the char_ptr variable to this pointer // the size of the detached string area will be stored into the length variable char_ptr = string.Detach(&length); // hereafter, the string area of the string object will be handled via the char_ptr variable ... // after used, the detached string area must be released explicitly MemoryFree(char_ptr);
[ public ] SFCError DetachSFXBuffer( SFXBufferPtr buffer // pointer to the buffer to be detached );
![]() |
Caution |
|---|---|
| Since this function is deprecated, use the SFXAnsiString::Detach function. | |
[ public, static ] SFXAnsiStringConstRef EmptyInstance(Void);
Return the reference to the instance of enpty string as the return value of function.
[ public, const ] Bool EndsWith( SFXAnsiStringConstRef string // string to check with Bool sensitive = true // case-sensitive or not );
[ public, const ] Bool EndsWith( ACharConstPtr string // string to check with Bool sensitive = true // case-sensitive or not );
[ public, const ] Bool EndsWith( AChar character // string to check with Bool sensitive = true // case-sensitive or not );
[ public, const ] Bool Equals( SFXAnsiStringConstRef string // string to compare with Bool sensitive = true // case-sensitive or not );
[ public, const ] Bool Equals( ACharConstPtr string // string to compare with Bool sensitive = true // case-sensitive or not );
[ public, const ] SInt32 FirstIndexOf( SFXAnsiStringConstRef string // string to match SInt32 index = SINT32_MINIMUM // beginning index to search from Bool sensitive = true // case-sensitive or not );
[ public, const ] SInt32 FirstIndexOf( ACharConstPtr string // string to match SInt32 index = SINT32_MINIMUM // beginning index to search from Bool sensitive = true // case-sensitive or not );
[ public, const ] SInt32 FirstIndexOf( AChar character // character to match SInt32 index = SINT32_MINIMUM // beginning index to search from Bool sensitive = true // case-sensitive or not );
To search from other than the beginning, specify the beginning index to match. (The origin index is 0.)
[ public, static ] SFXAnsiString Format( va_ref< SFXAnsiStringConst > format // string that represents a format ... // data );
[ public, static ] SFXAnsiString Format( va_ref< SFXWideStringConst > format // string that represents a format ... // data );
[ public, static ] SFXAnsiString Format( ACharConstPtr format // string that represents a format ... // data );
[ public, static ] SFXAnsiString Format( WCharConstPtr format // string that represents a format ... // data );
The SFXAnsiString::Format function is almost the same as the printf function in C language, the format on float is not available.
SIntN year = 2003;
SIntN month = 8;
SFXAnsiString str = SFXAnsiString::Format("%d Year %d Month ", year, month);
[ public, static ] SFXAnsiString FormatV( SFXAnsiStringConstRef format // string that represents a format va_list argument // variable-length argument );
[ public, static ] SFXAnsiString FormatV( SFXWideStringConstRef format // string that represents a format va_list argument // variable-length argument );
[ public, static ] SFXAnsiString FormatV( ACharConstPtr format // string that represents a format va_list argument // variable-length argument );
[ public, static ] SFXAnsiString FormatV( WCharConstPtr format // string that represents a format va_list argument // variable-length argument );
The SFXAnsiString::FormatV function is almost the same as the printf function in C language, the format on float is not available.
SFXAnsiString MyClass::variableArgument(SInt32 arg_num , ...)
{
va_list argument;
va_start(argument, arg_num);
SFXAnsiString str = SFXAnsiString::FormatV("%d Year %d Month %d Day %d Time %d Minute %d Second, It is %s today.", argument);
va_end(argument);
return str;
}
SFXAnsiString str = variableArgument(7, 2007, 7, 17, 17, 37, 50,"rainy");
// str = " 2007 Year 7 Month 17 Day 17 Time 37 Minute 50 Second, It is rainy today."
[ public ] ACharPtr GetBuffer(Void);
[ public, const ] ACharConstPtr GetBuffer(Void);
The SFXAnsiString::GetBuffer function cannot access the buffer area that is over the return value of SFXAnsiString::GetLength function
The SFXAnsiString::GetBuffer function returns a null when the string is empty. Data cannot be read from the null pointer.
It is necessary to confirm that the return value of SFXAnsiString::GetBuffer function is not a null.
SFXAnsiString::GetChar | SFXAnsiString::SetChar | SFXAnsiString::GetLength | SFXAnsiString::SetLength | SFXAnsiString::GetCString
[ public, const ] ACharConstPtr GetCString(Void);
The SFXAnsiString::GetCString function returns the internal buffer of string as ACharConstPtr type.
The SFXAnsiString::GetCString function returns a pointer to "\0" if the string is empty.
As the pointer returned by the SFXAnsiString::GetCString function is const, data cannot be written to the internal buffer through the pointer.
To write to the internal buffer, use the SFXAnsiString::GetBuffer function.
Get the character of intenal buffer at a specified index.
Whether the buffer is null or a specified index value is valid is not checked.
[ public, const ] UInt16 GetCluster(Void);
[ public, const ] SInt32 GetLength(Void);
[ public, const ] SInt32 GetLengthCString(Void);
SFXAnsiString str("abc\0abc", 7);
int i;
i = str.GetLengthCString(); // i = 3
i = str.GetLength(); // i = 7
[ public, const ] UInt16 GetThreshold(Void);
[ public, const ] SFXAnsiString Insert( SInt32 index // index to insert SFXAnsiStringConstRef string // string to insert );
[ public, const ] SFXAnsiString Insert( SInt32 index // index to insert ACharConstPtr string // string to insert SInt32 length = -1 // lengh of string to insert );
[ public, const ] SFXAnsiString Insert( SInt32 index // index to insert AChar character // character to insert );
Insert a string or character at a specified index of SFXAnsiString object. The string of current SFXAnsiString object will not be modified.
[ public, const ] Bool IsAlpha(Void);
[ public, const ] Bool IsAlphaDigit(Void);
[ public, const ] Bool IsAscii(Void);
[ public, const ] Bool IsControl(Void);
[ public, const ] Bool IsDigit(Void);
[ public, const ] Bool IsEmpty(Void);
[ public, const ] Bool IsEmptyCString(Void);
SFXAnsiString str("\0abc", 4);
Bool b;
b = str.IsEmptyCString(); // b = true
b = str.IsEmpty(); // b = false
[ public, const ] Bool IsGraph(Void);
[ public, const ] Bool IsHexDigit(Void);
The SFXAnsiString::IsHexDigit function checks whether or not the string is consisted of the digit, or a, b, c, d, e, f, A, B, C, D, E, F.
[ public, const ] Bool IsLower(Void);
[ public, const ] Bool Isnull(Void);
[ public, const ] Bool IsPrint(Void);
[ public, const ] Bool IsPunct(Void);
[ public, const ] Bool IsSpace(Void);
[ public, const ] Bool IsUpper(Void);
[ public, const ] SInt32 LastIndexOf( SFXAnsiStringConstRef string // string to match SInt32 index = SINT32_MAXIMUM // beginning index to search from Bool sensitive = true // case-sensitive or not );
[ public, const ] SInt32 LastIndexOf( ACharConstPtr string // string to match SInt32 index = SINT32_MAXIMUM // beginning index to match Bool sensitive = true // case-sensitive or not );
[ public, const ] SInt32 LastIndexOf( AChar character // character to match SInt32 index = SINT32_MAXIMUM // beginning index to match Bool sensitive = true // case-sensitive or not );
To search from other than the end, specify the beginning index to match. (The origin index is 0.)
The SFXAnsiString::Mul function updates the source string.
To presereve the source string, copy it somewhere beforehand.
SFXAnsiString str(abc");
str.Mul(3); // str = "abcabcabc"
SFXAnsiString::Add | SFXAnsiString::Sub | operator* | SFXAnsiString::operator*=
[ public, const ] SFXAnsiString Remove( SInt32 begin // beginning index(this index is included) SInt32 end // ending index(this index is not included) );
[ public, const ] SFXAnsiString Replace( SFXAnsiStringConstRef fstring // string to be replaced SFXAnsiStringConstRef tstring // string to replace with Bool sensitive = true // case-sensitive or not );
[ public, const ] SFXAnsiString Replace( SFXAnsiStringConstRef fstring // string to be replaced ACharConstPtr tstring // string to replace with Bool sensitive = true // case-sensitive or not );
[ public, const ] SFXAnsiString Replace( SFXAnsiStringConstRef fstring // string to be replaced ACharConstPtr tstring // string to replace with SInt32 tlength // length of string to replace with Bool sensitive = true // case-sensitive or not );
[ public, const ] SFXAnsiString Replace( ACharConstPtr fstring // string to be replaced SFXAnsiStringConstRef tstring // string to replace with Bool sensitive = true // case-sensitive or not );
[ public, const ] SFXAnsiString Replace( ACharConstPtr fstring // string to be replaced SInt32 flength // length of string to be replaced SFXAnsiStringConstRef tstring // string to replace with Bool sensitive = true // case-sensitive or not );
[ public, const ] SFXAnsiString Replace( ACharConstPtr fstring // string to be replaced ACharConstPtr tstring // string to replace with Bool sensitive = true // case-sensitive or not );
[ public, const ] SFXAnsiString Replace( ACharConstPtr fstring // string to be replaced SInt32 flength // length of string to be replaced ACharConstPtr tstring // string to replace with SInt32 tlength // length of string to replace with Bool sensitive = true // case-sensitive or not );
[ public, const ] SFXAnsiString Replace( SFXAnsiStringConstRef fstring // string to be replaced AChar tcharacter // character to replace with Bool sensitive = true // case-sensitive or not );
[ public, const ] SFXAnsiString Replace( AChar fcharacter // character to be replaced SFXAnsiStringConstRef tstring // string to replace with Bool sensitive = true // case-sensitive or not );
[ public, const ] SFXAnsiString Replace( AChar fcharacter // character to be replaced AChar tcharacter // character to replace with Bool sensitive = true // case-sensitive or not );
[ public, const ] SFXAnsiString Replace( ACharConstPtr fstring // string to be replaced AChar tcharacter // character to replace with Bool sensitive = true // case-sensitive or not );
[ public, const ] SFXAnsiString Replace( ACharConstPtr fstring // string to be replaced SInt32 flength // length of string to be replaced AChar tcharacter // character to replace with Bool sensitive = true // case-sensitive or not );
[ public, const ] SFXAnsiString Replace( AChar fcharacter // character to be replaced ACharConstPtr tstring // string to replace with Bool sensitive = true // case-sensitive or not );
[ public, const ] SFXAnsiString Replace( AChar fcharacter // character to be replaced ACharConstPtr tstring // string to replace with SInt32 tlength // length of string to replace with Bool sensitive = true // case-sensitive or not );
Return the replaced string.
The source string is not modified.
[ public ] SFCError Set( SFXAnsiStringConstRef string // source string of AChar type );
[ public ] SFCError Set( SFXWideStringConstRef string // source string of WChar type );
[ public ] SFCError Set( ACharConstPtr string // AChar pointer of source string SInt32 length = -1 // length of string );
[ public ] SFCError Set( WCharConstPtr string // WChar pointer of source string SInt32 length = -1 // length of string );
[ public ] SFCError Set( AChar character // AChar character of source string );
[ public ] SFCError Set( SFXBufferConstRef buffer // buffer of source string );
In case the SFXAnsiString::Set function fails due to insufficient memory, the source string value is not modified.
If the SFXAnsiString or SFXWideString object is specified as an argument, its string is set.
If the pointer to the AChar or WChar string is specified as an argument, the null-terminated string is set. And moreover by specifying the length as an argument, a string including several "null" characters can be set.
[ public ] SFCError SetChar( SInt32 index // index where a character is set AChar character // character to set );
Set a character at a specified index of internal buffer.
Whether a specified index is valid or the buffer is null is not checked.
This function sets the minimum unit to allocate the internal buffer memory(SFXClusterHeap). [in bytes]
Default: SFXAnsiString::DEFAULT_CLUSTER bytes
For the value of SFXAnsiString::DEFAULT_CLUSTER, refer to SFXAnsiString::DefaultEnum.
SFXAnsiString::GetCluster | SFXAnsiString::DefaultEnum | SFXClusterHeap::SetCluster | SFXClusterHeap
If a specified length is shorter than the string, the string characters after a specified length are lost. If a specified length is longer than the string, the string is extended with a null character.
This function sets the minimum memory of the internal buffer memory(SFXClusterHeap). [in bytes]
Default: SFXAnsiString::DEFAULT_THRESHOLD bytes
For the value of SFXAnsiString::DEFAULT_THRESHOLD, refer to SFXAnsiString::DefaultEnum.
SFXAnsiString::GetThreshold | SFXAnsiString::DefaultEnum | SFXClusterHeap::SetThreshold | SFXClusterHeap
[ public, const ] Bool StartsWith( SFXAnsiStringConstRef string // string to check with Bool sensitive = true // case-sensitive or not );
[ public, const ] Bool StartsWith( ACharConstPtr string // string to check with Bool sensitive = true // case-sensitive or not );
[ public, const ] Bool StartsWith( AChar character // character to check with Bool sensitive = true // case-sensitive or not );
[ public ] SFCError Sub( SFXAnsiStringConstRef string // string to delete );
[ public ] SFCError Sub( ACharConstPtr string // string to delete SInt32 length = -1 // length of string );
[ public ] SFCError Sub( AChar character // character to delete );
If the source string ends with a specified string, delete a specified string from the source string. Otherwise, nothing happens.
The SFXAnsiString::Sub function modifies the source string. To preserve the source string, use the operator "-".
[ public, const ] SFXAnsiString Substring( SInt32 begin // beginning index(this index is included) SInt32 end // ending index(this index is not included) );
Return the string from the ("begin" + 1)th character to the ("end")th character. Its length is (end - begin).
The SFXAnsiString::Substring function does not modify the source string.
If the value of "begin" is greater than that of "end", the "null" string is returned.
SFXAnsiString str1("American");
SFXAnsiString str2 = str1.Substring(2, 6); // str2 = "eric"
[ public ] Void ToLower(Void);
The SFXAnsiString::ToLower function modifies the source string.
To preserve the source string, use the SFXAnsiString::AsLower function.
[ public ] Void ToUpper(Void);
The SFXAnsiString::ToUpper function modifies the source string.
To preserve the source string, use the SFXAnsiString::AsUpper function.
[ public, const ] SFXAnsiString Trim( SFXAnsiStringConstRef string // string to trim Bool sensitive = true // case-sensitive or not );
[ public, const ] SFXAnsiString Trim( ACharConstPtr string // string to trim Bool sensitive = true // case-sensitive or not );
[ public, const ] SFXAnsiString Trim( AChar character // string to trim Bool sensitive = true // case-sensitive or not );
[ public, const ] SFXAnsiString Trim(Void);
When no argument is specified, the blank characters(space, tab, vertical tab, linefeed, return, formfeed) are trimmed from the beginning and end of source string.
When an argument is specified, a specified string/character is trimmed from the beginning and end of source string. If a specified string includes more than two characters, each character is compared with one by one.
The source string is not modified.
SFXAnsiString str1("\t delicious beef ");
SFXAnsiString str2 = str1.Trim(); // str2 = "delicious beef"
SFXAnsiString str3 = str2.Trim("adef"); // str3 = "licious b"
[ public, const ] SFXAnsiString TrimLeft( SFXAnsiStringConstRef string // string to trim Bool sensitive = true // case-sensitive or not );
[ public, const ] SFXAnsiString TrimLeft( ACharConstPtr string // string to trim Bool sensitive = true // case-sensitive or not );
[ public, const ] SFXAnsiString TrimLeft( AChar character // string to trim Bool sensitive = true // case-sensitive or not );
[ public, const ] SFXAnsiString TrimLeft(Void);
When no argument is specified, the blank characters(space, tab, vertical tab, linefeed, return, formfeed) are trimmed from the beginning of source string.
When an argument is specified, a specified string/character is trimmed from the beginning of source string. If a specified string includes more than two characters, each character is compared with one by one.
The source string is not modified.
SFXAnsiString str1("\t delicious beef ");
SFXAnsiString str2 = str1.TrimLeft(); // str2 = "delicious beef "
SFXAnsiString str3 = str2.TrimLeft("adef"); // str3 = "licious beef "
[ public, const ] SFXAnsiString TrimRight( SFXAnsiStringConstRef string // string to trim Bool sensitive = true // case-sensitive or not );
[ public, const ] SFXAnsiString TrimRight( ACharConstPtr string // string to trim Bool sensitive = true // case-sensitive or not );
[ public, const ] SFXAnsiString TrimRight( AChar character // string to trim Bool sensitive = true // case-sensitive or not );
[ public, const ] SFXAnsiString TrimRight(Void);
When no argument is specified, the blank characters(space, tab, vertical tab, linefeed, return, formfeed) are trimmed from the end of source string.
When an argument is specified, a specified string/character is trimmed from the end of source string. If a specified string includes more than two characters, each character is compared with one by one.
The source string is not modified.
SFXAnsiString str1("\t delicious beef ");
SFXAnsiString str2 = str1.TrimRight(); // str2 = "\t delicious beef"
SFXAnsiString str3 = str2.TrimRight("adef"); // str3 = "\t delicious b"
[ public, const ] SFXAnsiString Truncate(Void);
SFXAnsiString str1("abc\0abc", 7);
SFXAnsiString str2 = str1.Truncate(); // str2 = "abc"
[ public ] SFXAnsiStringRef operator=( SFXAnsiStringConstRef string // source string of AChar type );
[ public ] SFXAnsiStringRef operator=( SFXWideStringConstRef string // source string of WChar type );
[ public ] SFXAnsiStringRef operator=( ACharConstPtr string // AChar pointer of source string );
[ public ] SFXAnsiStringRef operator=( WCharConstPtr string // WChar pointer of source string );
If a SFXWideString or SFXWideString object is specified, the string will be replaced with it.
If a pointer to the AChar or WChar, the string will be replaced with the null-terminated string shown by the pointer.
[ public, friend ] Bool operator==( SFXAnsiStringConstRef left // string to compare SFXAnsiStringConstRef right // string to compare );
[ public, friend ] Bool operator==( SFXAnsiStringConstRef left // string to compare SFXWideStringConstRef right // string to compare );
[ public, friend ] Bool operator==( SFXAnsiStringConstRef left // string to compare ACharConstPtr right // string to compare );
[ public, friend ] Bool operator==( SFXAnsiStringConstRef left // string to compare WCharConstPtr right // string to compare );
[ public, friend ] Bool operator==( ACharConstPtr left // string to compare SFXAnsiStringConstRef right // string to compare );
[ public, friend ] Bool operator==( WCharConstPtr left // string to compare SFXAnsiStringConstRef right // string to compare );
[ public, friend ] Bool operator>=( SFXAnsiStringConstRef left // string to compare SFXAnsiStringConstRef right // string to compare );
[ public, friend ] Bool operator>=( SFXAnsiStringConstRef left // string to compare SFXWideStringConstRef right // string to compare );
[ public, friend ] Bool operator>=( SFXAnsiStringConstRef left // string to compare ACharConstPtr right // string to compare );
[ public, friend ] Bool operator>=( SFXAnsiStringConstRef left // string to compare WCharConstPtr right // string to compare );
[ public, friend ] Bool operator>=( ACharConstPtr left // string to compare SFXAnsiStringConstRef right // string to compare );
[ public, friend ] Bool operator>=( WCharConstPtr left // string to compare SFXAnsiStringConstRef right // string to compare );
[ public, friend ] Bool operator>( SFXAnsiStringConstRef left // string to compare SFXAnsiStringConstRef right // string to compare );
[ public, friend ] Bool operator>( SFXAnsiStringConstRef left // string to compare SFXWideStringConstRef right // string to compare );
[ public, friend ] Bool operator>( SFXAnsiStringConstRef left // string to compare ACharConstPtr right // string to compare );
[ public, friend ] Bool operator>( SFXAnsiStringConstRef left // string to compare WCharConstPtr right // string to compare );
[ public, friend ] Bool operator>( ACharConstPtr left // string to compare SFXAnsiStringConstRef right // string to compare );
[ public, friend ] Bool operator>( WCharConstPtr left // string to compare SFXAnsiStringConstRef right // string to compare );
SFXAnsiString::Compare | operator>= | operator< | operator<=
[ public ] ACharRef operator[]( SInt32 index // index position of string to get );
[ public, const ] ACharConstRef operator[]( SInt32 index // index position of string to get );
Get the character of intenal buffer at a specified index.
Whether the buffer is null or a specified index value is valid is not checked.
[ public, friend ] SFXAnsiStringRef operator<<( SFXAnsiStringRef left // target string SFXAnsiStringConstRef right // string to append );
[ public, friend ] SFXAnsiStringRef operator<<( SFXAnsiStringRef left // target string SFXWideStringConstRef right // string to append );
[ public, friend ] SFXAnsiStringRef operator<<( SFXAnsiStringRef left // target string ACharConstPtr right // string to append );
[ public, friend ] SFXAnsiStringRef operator<<( SFXAnsiStringRef left // target string WCharConstPtr right // string to append );
[ public, friend ] SFXAnsiStringRef operator<<( SFXAnsiStringRef left // target string AChar right // string to append );
Append a specified string onto the end of string.
To combine several strings fast, use the inserter operator<<.
The operator<< updates the source string.
SFXAnsiString str = "abc";
str << "def" << "ghi"; // str = "abcdefghi"
[ public, friend ] Bool operator<=( SFXAnsiStringConstRef left // string to compare SFXAnsiStringConstRef right // string to compare );
[ public, friend ] Bool operator<=( SFXAnsiStringConstRef left // string to compare SFXWideStringConstRef right // string to compare );
[ public, friend ] Bool operator<=( SFXAnsiStringConstRef left // string to compare ACharConstPtr right // string to compare );
[ public, friend ] Bool operator<=( SFXAnsiStringConstRef left // string to compare WCharConstPtr right // string to compare );
[ public, friend ] Bool operator<=( ACharConstPtr left // string to compare SFXAnsiStringConstRef right // string to compare );
[ public, friend ] Bool operator<=( WCharConstPtr left // string to compare SFXAnsiStringConstRef right // string to compare );
[ public, friend ] Bool operator<( SFXAnsiStringConstRef left // string to compare SFXAnsiStringConstRef right // string to compare );
[ public, friend ] Bool operator<( SFXAnsiStringConstRef left // string to compare SFXWideStringConstRef right // string to compare );
[ public, friend ] Bool operator<( SFXAnsiStringConstRef left // string to compare ACharConstPtr right // string to compare );
[ public, friend ] Bool operator<( SFXAnsiStringConstRef left // string to compare WCharConstPtr right // string to compare );
[ public, friend ] Bool operator<( ACharConstPtr left // string to compare SFXAnsiStringConstRef right // string to compare );
[ public, friend ] Bool operator<( WCharConstPtr left // string to compare SFXAnsiStringConstRef right // string to compare );
SFXAnsiString::Compare | operator> | operator>= | operator<=
[ public ] SFXAnsiStringRef operator-=( SFXAnsiStringConstRef string // string to delete from the end );
[ public ] SFXAnsiStringRef operator-=( ACharConstPtr string // string to delete from the end );
[ public ] SFXAnsiStringRef operator-=( AChar character // character to delete from the end );
If the string to delete exists , delete it.
If the string to delete does not exist , do nothing.
SFXAnsiString::Sub | operator+ | SFXAnsiString::operator+= | operator- | operator* | SFXAnsiString::operator*=
[ public, friend ] SFXAnsiString operator-( SFXAnsiStringConstRef left // target string SFXAnsiStringConstRef right // string to delete from the end );
[ public, friend ] SFXAnsiString operator-( SFXAnsiStringConstRef left // target string SFXWideStringConstRef right // string to delete from the end );
[ public, friend ] SFXAnsiString operator-( SFXAnsiStringConstRef left // target string ACharConstPtr right // string to delete from the end );
[ public, friend ] SFXAnsiString operator-( SFXAnsiStringConstRef left // target string WCharConstPtr right // string to delete from the end );
[ public, friend ] SFXAnsiString operator-( ACharConstPtr left // target string SFXAnsiStringConstRef right // string to delete from the end );
[ public, friend ] SFXAnsiString operator-( WCharConstPtr left // target string SFXAnsiStringConstRef right // string to delete from the end );
[ public, friend ] SFXAnsiString operator-( SFXAnsiStringConstRef left // target string AChar right // character to delete from the end );
[ public, friend ] SFXAnsiString operator-( AChar left // target Character SFXAnsiStringConstRef right // string to delete from the end );
If the string to delete exists in the end of the target string, delete it and return the remained string.
If the string to delete does not exist in the end of the target string, do nothing, just copy it and return it.
SFXAnsiString str1("Hello World");
SFXAnsiString str2(" World");
SFXAnsiString str3 = str1 - str2; // str3 = "Hello"
SFXAnsiString::Sub | operator+ | SFXAnsiString::operator+= | SFXAnsiString::operator-= | operator* | SFXAnsiString::operator*=
[ public ] SFXAnsiStringRef operator*=( SInt32 repeat // times to repeat );
SFXAnsiString::Mul | operator+ | SFXAnsiString::operator+= | operator- | SFXAnsiString::operator-= | operator*
[ public, friend ] SFXAnsiString operator*( SFXAnsiStringConstRef left // string to repeat SInt32 right // times to repeat );
SFXAnsiString::Mul | operator+ | SFXAnsiString::operator+= | operator- | SFXAnsiString::operator-= | SFXAnsiString::operator*=
[ public, friend ] Bool operator!=( SFXAnsiStringConstRef left // string to compare SFXAnsiStringConstRef right // string to compare );
[ public, friend ] Bool operator!=( SFXAnsiStringConstRef left // string to compare SFXWideStringConstRef right // string to compare );
[ public, friend ] Bool operator!=( SFXAnsiStringConstRef left // string to compare ACharConstPtr right // string to compare );
[ public, friend ] Bool operator!=( SFXAnsiStringConstRef left // string to compare WCharConstPtr right // string to compare );
[ public, friend ] Bool operator!=( ACharConstPtr left // string to compare SFXAnsiStringConstRef right // string to compare );
[ public, friend ] Bool operator!=( WCharConstPtr left // string to compare SFXAnsiStringConstRef right // string to compare );
[ public ] SFXAnsiStringRef operator+=( SFXAnsiStringConstRef string // string to add );
[ public ] SFXAnsiStringRef operator+=( ACharConstPtr string // string to add );
[ public ] SFXAnsiStringRef operator+=( AChar character // 追加する文字 );
[ public, friend ] SFXAnsiString operator+( SFXAnsiStringConstRef left // source string SFXAnsiStringConstRef right // string to add );
[ public, friend ] SFXAnsiString operator+( SFXAnsiStringConstRef left // source string SFXWideStringConstRef right // string to add );
[ public, friend ] SFXAnsiString operator+( SFXAnsiStringConstRef left // source string ACharConstPtr right // string to add );
[ public, friend ] SFXAnsiString operator+( SFXAnsiStringConstRef left // source string WCharConstPtr right // string to add );
[ public, friend ] SFXAnsiString operator+( ACharConstPtr left // source string SFXAnsiStringConstRef right // string to add );
[ public, friend ] SFXAnsiString operator+( WCharConstPtr left // source string SFXAnsiStringConstRef right // string to add );
[ public, friend ] SFXAnsiString operator+( SFXAnsiStringConstRef left // source string AChar right // character to add );
[ public, friend ] SFXAnsiString operator+( AChar left // source character SFXAnsiStringConstRef right // character to add );
SFXAnsiString::Add | SFXAnsiString::Concat | SFXAnsiString::operator+=
enum DefaultEnum {
DEFAULT_THRESHOLD = 4 * sizeof(AChar), // default minimum size of the internal buffer memory [in bytes]
DEFAULT_CLUSTER = 8 * sizeof(AChar) // default cluster size to allocate the internal buffer memory [in bytes]
};
DEFAULT_THRESHOLD and DEFAULT_CLUSTER are the constants that represent the default values for the minimum size and the cluster size of the internal buffer memory(SFXClusterHeap). [in bytes]
|
Copyright(c) 2002 - 2010 Sophia Cradle Incorporated All Rights Reserved. |
![]() ![]() ![]()
|