SophiaFramework UNIVERSE 5.3 |
SFXAnsiString and SFXWideString
In the BREW environment, there are two kinds of character types: one is the char type that represents the single/multi byte character(or the ANSI character) and the other is the AECHAR type that represents the double byte character of the uint16 type.
In SophiaFramewok UNIVERSE, these two kinds of character types are defined as AChar and WChar using typedef respectively. And two kinds of the following string classes are available:
All the functions of these two string classes are the same except their string types.
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 801. 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 802. 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 this string.
|
SFCError |
Add(
ACharConstPtr string
, SInt32 length = -1
) Add the specified string to the end of this string.
|
SFCError |
Add(
AChar character
) Add the specified string to the end of this string.
|
SFXAnsiString |
AsLower( Void ) Get this string converted to lower case.
|
SInt32 |
AsSInt32(
SInt32 substitute = 0
) Convert this string into the integer of the SInt32 type.
|
UInt32 |
AsUInt32(
UInt32 substitute = 0
) Convert this string into the integer of the UInt32 type.
|
SFXAnsiString |
AsUpper( Void ) Get this string converted to upper case.
|
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 this string.
|
SInt32 |
Compare(
SFXAnsiStringConstRef string
, Bool sensitive = true
) Compare this string with the specified string in dictionary order.
|
SInt32 |
Compare(
ACharConstPtr string
, Bool sensitive = true
) Compare this string with the specified string in dictionary order.
|
SFXAnsiString |
Concat(
SFXAnsiStringConstRef string
) Get the string obtained by concatenating this string and the specified string.
|
SFXAnsiString |
Concat(
ACharConstPtr string
, SInt32 length = -1
) Get the string obtained by concatenating this string and the specified string.
|
SFXAnsiString |
Concat(
AChar character
) Get the string obtained by concatenating this string and the specified string.
|
SFCError |
Copy(
SInt32 index
, SFXAnsiStringConstRef string
) Overwrite with the specified string.
|
SFCError |
Copy(
SInt32 index
, ACharConstPtr string
, SInt32 length = -1
) Overwrite with the 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 the empty string.
|
Bool |
EndsWith(
SFXAnsiStringConstRef string
, Bool sensitive = true
) Check whether or not this string ends with the specified string.
|
Bool |
EndsWith(
ACharConstPtr string
, Bool sensitive = true
) Check whether or not this string ends with the specified string.
|
Bool |
EndsWith(
AChar character
, Bool sensitive = true
) Check whether or not this string ends with the specified string.
|
Bool |
Equals(
SFXAnsiStringConstRef string
, Bool sensitive = true
) Check whether or not this string equals the specified string.
|
Bool |
Equals(
ACharConstPtr string
, Bool sensitive = true
) Check whether or not this string equals the specified string.
|
Void |
Fill(
AChar character
) Fill this string with the specified character.
|
SInt32 |
FirstIndexOf(
SFXAnsiStringConstRef string
, SInt32 index = SINT32_MINIMUM
, Bool sensitive = true
) Get the first index of this string to match the specified value, searching from the beginning.
|
SInt32 |
FirstIndexOf(
ACharConstPtr string
, SInt32 index = SINT32_MINIMUM
, Bool sensitive = true
) Get the first index of this string to match the specified value, searching from the beginning.
|
SInt32 |
FirstIndexOf(
AChar character
, SInt32 index = SINT32_MINIMUM
, Bool sensitive = true
) Get the first index of this string to match the specified value, searching from the beginning.
|
static SFXAnsiString |
Format(
va_ref< SFXAnsiStringConst > format
, ...
) Create a string from the specified data by using the specified format.
|
static SFXAnsiString |
Format(
va_ref< SFXWideStringConst > format
, ...
) Create a string from the specified data by using the specified format.
|
static SFXAnsiString |
Format(
ACharConstPtr format
, ...
) Create a string from the specified data by using the specified format.
|
static SFXAnsiString |
Format(
WCharConstPtr format
, ...
) Create a string from the specified data by using the specified format.
|
static SFXAnsiString |
FormatV(
SFXAnsiStringConstRef format
, va_list argument
) Create a string from the variable-length argument by using the specified format.
|
static SFXAnsiString |
FormatV(
SFXWideStringConstRef format
, va_list argument
) Create a string from the variable-length argument by using the specified format.
|
static SFXAnsiString |
FormatV(
ACharConstPtr format
, va_list argument
) Create a string from the variable-length argument by using the specified format.
|
static SFXAnsiString |
FormatV(
WCharConstPtr format
, va_list argument
) Create a string from the variable-length argument by using the specified format.
|
ACharPtr |
GetBuffer( Void ) Get the pointer to the internal buffer of this string.
|
ACharConstPtr |
GetBuffer( Void ) Get the pointer to the internal buffer of this string.
|
ACharConstPtr |
GetCString( Void ) Get the const pointer to the internal buffer of this string.
|
AChar |
GetChar(
SInt32 index
) Get the character at the specified index of this string.
|
UInt16 |
GetCluster( Void ) Get the cluster size of the internal buffer memory of this string. [in bytes]
|
SInt32 |
GetLength( Void ) Get the length(number of the characters) of this string.
|
SInt32 |
GetLengthCString( Void ) Get the length(number of the characters) until the first "\0" character of this string.
|
UInt16 |
GetThreshold( Void ) Get the minimum size of the internal buffer memory of this string. [in bytes]
|
SFXAnsiString |
Insert(
SInt32 index
, SFXAnsiStringConstRef string
) Get the string obtained by inserting the specified string or character at the specified index of this string.
|
SFXAnsiString |
Insert(
SInt32 index
, ACharConstPtr string
, SInt32 length = -1
) Get the string obtained by inserting the specified string or character at the specified index of this string.
|
SFXAnsiString |
Insert(
SInt32 index
, AChar character
) Get the string obtained by inserting the specified string or character at the specified index of this string.
|
Bool |
IsAlpha( Void ) Check whether or not all the characters of this string are alphabetic.
|
Bool |
IsAlphaDigit( Void ) Check whether or not all the characters of this string are alphanumeric.
|
Bool |
IsAscii( Void ) Check whether or not all the characters of this string are ASCII.
|
Bool |
IsControl( Void ) Check whether or not all the characters of this string are the control characters.
|
Bool |
IsDigit( Void ) Check whether or not all the characters of this string are digit.
|
Bool |
IsEmpty( Void ) Check whether or not the length of this string is 0(this string is empty).
|
Bool |
IsEmptyCString( Void ) Check whether or not the first character of this string is null('\0').
|
Bool |
IsGraph( Void ) Check whether or not all the characters of this string are graphic.
|
Bool |
IsHexDigit( Void ) Check whether or not all the characters of this string are Hex digit.
|
Bool |
IsLower( Void ) Check whether or not all the characters of this string are lower-case.
|
Bool |
IsNull( Void ) Check whether or not all the characters of this string are null('\0').
|
Bool |
IsPrint( Void ) Check whether or not all the characters of this string are printable.
|
Bool |
IsPunct( Void ) Check whether or not all the characters of this string are not space nor alphanumeric but printable.
|
Bool |
IsSpace( Void ) Check whether or not all the characters of this string are space.
|
Bool |
IsUpper( Void ) Check whether or not all the characters of this string are upper-case.
|
SInt32 |
LastIndexOf(
SFXAnsiStringConstRef string
, SInt32 index = SINT32_MAXIMUM
, Bool sensitive = true
) Get the last index of this string to match the specified value, searching from the end.
|
SInt32 |
LastIndexOf(
ACharConstPtr string
, SInt32 index = SINT32_MAXIMUM
, Bool sensitive = true
) Get the last index of this string to match the specified value, searching from the end.
|
SInt32 |
LastIndexOf(
AChar character
, SInt32 index = SINT32_MAXIMUM
, Bool sensitive = true
) Get the last index of this string to match the specified value, searching from the end.
|
SFCError |
Mul(
SInt32 repeat
) Make this string repeated by the specified times.
|
SFXAnsiString |
Remove(
SInt32 begin
, SInt32 end
) Get the string obtained by removing characters in the specified range from this string.
|
SFXAnsiString |
Replace(
SFXAnsiStringConstRef fstring
, SFXAnsiStringConstRef tstring
, Bool sensitive = true
) Get the string obtained by replacing the specified substring in this string with the specified string.
|
SFXAnsiString |
Replace(
SFXAnsiStringConstRef fstring
, ACharConstPtr tstring
, Bool sensitive = true
) Get the string obtained by replacing the specified substring in this string with the specified string.
|
SFXAnsiString |
Replace(
SFXAnsiStringConstRef fstring
, ACharConstPtr tstring
, SInt32 tlength
, Bool sensitive = true
) Get the string obtained by replacing the specified substring in this string with the specified string.
|
SFXAnsiString |
Replace(
ACharConstPtr fstring
, SFXAnsiStringConstRef tstring
, Bool sensitive = true
) Get the string obtained by replacing the specified substring in this string with the specified string.
|
SFXAnsiString |
Replace(
ACharConstPtr fstring
, SInt32 flength
, SFXAnsiStringConstRef tstring
, Bool sensitive = true
) Get the string obtained by replacing the specified substring in this string with the specified string.
|
SFXAnsiString |
Replace(
ACharConstPtr fstring
, ACharConstPtr tstring
, Bool sensitive = true
) Get the string obtained by replacing the specified substring in this string with the specified string.
|
SFXAnsiString |
Replace(
ACharConstPtr fstring
, SInt32 flength
, ACharConstPtr tstring
, SInt32 tlength
, Bool sensitive = true
) Get the string obtained by replacing the specified substring in this string with the specified string.
|
SFXAnsiString |
Replace(
SFXAnsiStringConstRef fstring
, AChar tcharacter
, Bool sensitive = true
) Get the string obtained by replacing the specified substring in this string with the specified string.
|
SFXAnsiString |
Replace(
AChar fcharacter
, SFXAnsiStringConstRef tstring
, Bool sensitive = true
) Get the string obtained by replacing the specified substring in this string with the specified string.
|
SFXAnsiString |
Replace(
AChar fcharacter
, AChar tcharacter
, Bool sensitive = true
) Get the string obtained by replacing the specified substring in this string with the specified string.
|
SFXAnsiString |
Replace(
ACharConstPtr fstring
, AChar tcharacter
, Bool sensitive = true
) Get the string obtained by replacing the specified substring in this string with the specified string.
|
SFXAnsiString |
Replace(
ACharConstPtr fstring
, SInt32 flength
, AChar tcharacter
, Bool sensitive = true
) Get the string obtained by replacing the specified substring in this string with the specified string.
|
SFXAnsiString |
Replace(
AChar fcharacter
, ACharConstPtr tstring
, Bool sensitive = true
) Get the string obtained by replacing the specified substring in this string with the specified string.
|
SFXAnsiString |
Replace(
AChar fcharacter
, ACharConstPtr tstring
, SInt32 tlength
, Bool sensitive = true
) Get the string obtained by replacing the specified substring in this string with the specified string.
|
SFCError |
Set(
SFXAnsiStringConstRef string
) Set this string to the specified string, character, or buffer.
|
SFCError |
Set(
SFXWideStringConstRef string
) Set this string to the specified string, character, or buffer.
|
SFCError |
Set(
ACharConstPtr string
, SInt32 length = -1
) Set this string to the specified string, character, or buffer.
|
SFCError |
Set(
WCharConstPtr string
, SInt32 length = -1
) Set this string to the specified string, character, or buffer.
|
SFCError |
Set(
AChar character
) Set this string to the specified string, character, or buffer.
|
SFCError |
Set(
SFXBufferConstRef buffer
) Set this string to the specified string, character, or buffer.
|
SFCError |
SetChar(
SInt32 index
, AChar character
) Set the specified character at the specified index of this string.
|
Void |
SetCluster(
UInt16 size
) Set the cluster size of the internal buffer memory of this string. [in bytes]
|
SFCError |
SetLength(
SInt32 length
) Set the length of this string.
|
Void |
SetThreshold(
UInt16 size
) Set the minimum size of the internal buffer memory of this string. [in bytes]
|
Bool |
StartsWith(
SFXAnsiStringConstRef string
, Bool sensitive = true
) Check whether or not this string starts with the specified string.
|
Bool |
StartsWith(
ACharConstPtr string
, Bool sensitive = true
) Check whether or not this string starts with the specified string.
|
Bool |
StartsWith(
AChar character
, Bool sensitive = true
) Check whether or not this string starts with the specified string.
|
SFCError |
Sub(
SFXAnsiStringConstRef string
) Delete the specified string at the end of this string.
|
SFCError |
Sub(
ACharConstPtr string
, SInt32 length = -1
) Delete the specified string at the end of this string.
|
SFCError |
Sub(
AChar character
) Delete the specified string at the end of this string.
|
SFXAnsiString |
Substring(
SInt32 begin
, SInt32 end
) Get the sub-string in the specified range of this string.
|
Void |
ToLower( Void ) Convert this string to lower-case.
|
Void |
ToUpper( Void ) Convert this string to upper-case.
|
SFXAnsiString |
Trim(
SFXAnsiStringConstRef string
, Bool sensitive = true
) Get the string obtained by trimming the blank characters or the specified string/character from the head and tail of this string.
|
SFXAnsiString |
Trim(
ACharConstPtr string
, Bool sensitive = true
) Get the string obtained by trimming the blank characters or the specified string/character from the head and tail of this string.
|
SFXAnsiString |
Trim(
AChar character
, Bool sensitive = true
) Get the string obtained by trimming the blank characters or the specified string/character from the head and tail of this string.
|
SFXAnsiString |
Trim( Void ) Get the string obtained by trimming the blank characters or the specified string/character from the head and tail of this string.
|
SFXAnsiString |
TrimLeft(
SFXAnsiStringConstRef string
, Bool sensitive = true
) Get the string obtained by trimming the blank characters or the specified string/character from the head of this string.
|
SFXAnsiString |
TrimLeft(
ACharConstPtr string
, Bool sensitive = true
) Get the string obtained by trimming the blank characters or the specified string/character from the head of this string.
|
SFXAnsiString |
TrimLeft(
AChar character
, Bool sensitive = true
) Get the string obtained by trimming the blank characters or the specified string/character from the head of this string.
|
SFXAnsiString |
TrimLeft( Void ) Get the string obtained by trimming the blank characters or the specified string/character from the head of this string.
|
SFXAnsiString |
TrimRight(
SFXAnsiStringConstRef string
, Bool sensitive = true
) Get the string obtained by trimming the blank characters or the specified string/character from the tail of this string.
|
SFXAnsiString |
TrimRight(
ACharConstPtr string
, Bool sensitive = true
) Get the string obtained by trimming the blank characters or the specified string/character from the tail of this string.
|
SFXAnsiString |
TrimRight(
AChar character
, Bool sensitive = true
) Get the string obtained by trimming the blank characters or the specified string/character from the tail of this string.
|
SFXAnsiString |
TrimRight( Void ) Get the string obtained by trimming the blank characters or the specified string/character from the tail of this string.
|
SFXAnsiString |
Truncate( Void ) Get the string until the first null('\0') character of this string.
|
SFXAnsiStringRef |
operator*=(
SInt32 repeat
) Repeat the left-hand string by the right-hand times.
|
SFXAnsiStringRef |
operator+=(
SFXAnsiStringConstRef string
) Add the right-hand string to the end of the left-hand string.
|
SFXAnsiStringRef |
operator+=(
ACharConstPtr string
) Add the right-hand string to the end of the left-hand string.
|
SFXAnsiStringRef |
operator+=(
AChar character
) Add the right-hand string to the end of the left-hand string.
|
SFXAnsiStringRef |
operator-=(
SFXAnsiStringConstRef string
) Delete the right-hand string from the end of the left-hand string.
|
SFXAnsiStringRef |
operator-=(
ACharConstPtr string
) Delete the right-hand string from the end of the left-hand string.
|
SFXAnsiStringRef |
operator-=(
AChar character
) Delete the right-hand string from the end of the left-hand string.
|
SFXAnsiStringRef |
operator<<(
SFXAnsiStringRef left
, SFXAnsiStringConstRef right
) Add the right-hand string to the end of the left-hand string.
|
SFXAnsiStringRef |
operator<<(
SFXAnsiStringRef left
, SFXWideStringConstRef right
) Add the right-hand string to the end of the left-hand string.
|
SFXAnsiStringRef |
operator<<(
SFXAnsiStringRef left
, ACharConstPtr right
) Add the right-hand string to the end of the left-hand string.
|
SFXAnsiStringRef |
operator<<(
SFXAnsiStringRef left
, WCharConstPtr right
) Add the right-hand string to the end of the left-hand string.
|
SFXAnsiStringRef |
operator<<(
SFXAnsiStringRef left
, AChar right
) Add the right-hand string to the end of the left-hand string.
|
SFXAnsiStringRef |
operator=(
SFXAnsiStringConstRef string
) Assign the right-hand string to the left-hand string.
|
SFXAnsiStringRef |
operator=(
SFXWideStringConstRef string
) Assign the right-hand string to the left-hand string.
|
SFXAnsiStringRef |
operator=(
ACharConstPtr string
) Assign the right-hand string to the left-hand string.
|
SFXAnsiStringRef |
operator=(
WCharConstPtr string
) Assign the right-hand string to the left-hand string.
|
ACharRef |
operator[](
SInt32 index
) Get the character at the right-hand index of the left-hand string.
|
ACharConstRef |
operator[](
SInt32 index
) Get the character at the right-hand index of the left-hand string.
|
Bool |
operator==(
SFXAnsiStringConstRef left
, SFXAnsiStringConstRef right
) Check whether or not the left-hand string is the same with the right-hand string.
|
Bool |
operator==(
SFXAnsiStringConstRef left
, SFXWideStringConstRef right
) Check whether or not the left-hand string is the same with the right-hand string.
|
Bool |
operator==(
SFXAnsiStringConstRef left
, ACharConstPtr right
) Check whether or not the left-hand string is the same with the right-hand string.
|
Bool |
operator==(
SFXAnsiStringConstRef left
, WCharConstPtr right
) Check whether or not the left-hand string is the same with the right-hand string.
|
Bool |
operator==(
ACharConstPtr left
, SFXAnsiStringConstRef right
) Check whether or not the left-hand string is the same with the right-hand string.
|
Bool |
operator==(
WCharConstPtr left
, SFXAnsiStringConstRef right
) Check whether or not the left-hand string is the same with the right-hand string.
|
Bool |
operator>=(
SFXAnsiStringConstRef left
, SFXAnsiStringConstRef right
) Check whether or not the left-hand string is greater than or equals the right-hand string.
|
Bool |
operator>=(
SFXAnsiStringConstRef left
, SFXWideStringConstRef right
) Check whether or not the left-hand string is greater than or equals the right-hand string.
|
Bool |
operator>=(
SFXAnsiStringConstRef left
, ACharConstPtr right
) Check whether or not the left-hand string is greater than or equals the right-hand string.
|
Bool |
operator>=(
SFXAnsiStringConstRef left
, WCharConstPtr right
) Check whether or not the left-hand string is greater than or equals the right-hand string.
|
Bool |
operator>=(
ACharConstPtr left
, SFXAnsiStringConstRef right
) Check whether or not the left-hand string is greater than or equals the right-hand string.
|
Bool |
operator>=(
WCharConstPtr left
, SFXAnsiStringConstRef right
) Check whether or not the left-hand string is greater than or equals the right-hand string.
|
Bool |
operator>(
SFXAnsiStringConstRef left
, SFXAnsiStringConstRef right
) Check whether or not the left-hand string is greater than the right-hand string.
|
Bool |
operator>(
SFXAnsiStringConstRef left
, SFXWideStringConstRef right
) Check whether or not the left-hand string is greater than the right-hand string.
|
Bool |
operator>(
SFXAnsiStringConstRef left
, ACharConstPtr right
) Check whether or not the left-hand string is greater than the right-hand string.
|
Bool |
operator>(
SFXAnsiStringConstRef left
, WCharConstPtr right
) Check whether or not the left-hand string is greater than the right-hand string.
|
Bool |
operator>(
ACharConstPtr left
, SFXAnsiStringConstRef right
) Check whether or not the left-hand string is greater than the right-hand string.
|
Bool |
operator>(
WCharConstPtr left
, SFXAnsiStringConstRef right
) Check whether or not the left-hand string is greater than the right-hand string.
|
Bool |
operator<=(
SFXAnsiStringConstRef left
, SFXAnsiStringConstRef right
) Check whether or not the left-hand string is less than or equals the right-hand string.
|
Bool |
operator<=(
SFXAnsiStringConstRef left
, SFXWideStringConstRef right
) Check whether or not the left-hand string is less than or equals the right-hand string.
|
Bool |
operator<=(
SFXAnsiStringConstRef left
, ACharConstPtr right
) Check whether or not the left-hand string is less than or equals the right-hand string.
|
Bool |
operator<=(
SFXAnsiStringConstRef left
, WCharConstPtr right
) Check whether or not the left-hand string is less than or equals the right-hand string.
|
Bool |
operator<=(
ACharConstPtr left
, SFXAnsiStringConstRef right
) Check whether or not the left-hand string is less than or equals the right-hand string.
|
Bool |
operator<=(
WCharConstPtr left
, SFXAnsiStringConstRef right
) Check whether or not the left-hand string is less than or equals the right-hand string.
|
Bool |
operator<(
SFXAnsiStringConstRef left
, SFXAnsiStringConstRef right
) Check whether or not the left-hand string is less than the right-hand string.
|
Bool |
operator<(
SFXAnsiStringConstRef left
, SFXWideStringConstRef right
) Check whether or not the left-hand string is less than the right-hand string.
|
Bool |
operator<(
SFXAnsiStringConstRef left
, ACharConstPtr right
) Check whether or not the left-hand string is less than the right-hand string.
|
Bool |
operator<(
SFXAnsiStringConstRef left
, WCharConstPtr right
) Check whether or not the left-hand string is less than the right-hand string.
|
Bool |
operator<(
ACharConstPtr left
, SFXAnsiStringConstRef right
) Check whether or not the left-hand string is less than the right-hand string.
|
Bool |
operator<(
WCharConstPtr left
, SFXAnsiStringConstRef right
) Check whether or not the left-hand string is less than the right-hand string.
|
SFXAnsiString |
operator-(
SFXAnsiStringConstRef left
, SFXAnsiStringConstRef right
) Return the string obtained by deleting the right-hand string from the end of the left-hand string.
|
SFXAnsiString |
operator-(
SFXAnsiStringConstRef left
, SFXWideStringConstRef right
) Return the string obtained by deleting the right-hand string from the end of the left-hand string.
|
SFXAnsiString |
operator-(
SFXAnsiStringConstRef left
, ACharConstPtr right
) Return the string obtained by deleting the right-hand string from the end of the left-hand string.
|
SFXAnsiString |
operator-(
SFXAnsiStringConstRef left
, WCharConstPtr right
) Return the string obtained by deleting the right-hand string from the end of the left-hand string.
|
SFXAnsiString |
operator-(
ACharConstPtr left
, SFXAnsiStringConstRef right
) Return the string obtained by deleting the right-hand string from the end of the left-hand string.
|
SFXAnsiString |
operator-(
WCharConstPtr left
, SFXAnsiStringConstRef right
) Return the string obtained by deleting the right-hand string from the end of the left-hand string.
|
SFXAnsiString |
operator-(
SFXAnsiStringConstRef left
, AChar right
) Return the string obtained by deleting the right-hand string from the end of the left-hand string.
|
SFXAnsiString |
operator-(
AChar left
, SFXAnsiStringConstRef right
) Return the string obtained by deleting the right-hand string from the end of the left-hand string.
|
SFXAnsiString |
operator*(
SFXAnsiStringConstRef left
, SInt32 right
) Return the string obtained by repeating the left-hand string by the right-hand times.
|
Bool |
operator!=(
SFXAnsiStringConstRef left
, SFXAnsiStringConstRef right
) Check whether or not the left-hand string is different from the right-hand string.
|
Bool |
operator!=(
SFXAnsiStringConstRef left
, SFXWideStringConstRef right
) Check whether or not the left-hand string is different from the right-hand string.
|
Bool |
operator!=(
SFXAnsiStringConstRef left
, ACharConstPtr right
) Check whether or not the left-hand string is different from the right-hand string.
|
Bool |
operator!=(
SFXAnsiStringConstRef left
, WCharConstPtr right
) Check whether or not the left-hand string is different from the right-hand string.
|
Bool |
operator!=(
ACharConstPtr left
, SFXAnsiStringConstRef right
) Check whether or not the left-hand string is different from the right-hand string.
|
Bool |
operator!=(
WCharConstPtr left
, SFXAnsiStringConstRef right
) Check whether or not the left-hand string is different from the right-hand string.
|
SFXAnsiString |
operator+(
SFXAnsiStringConstRef left
, SFXAnsiStringConstRef right
) Return the string obtained by adding the right-hand string to the end of the left-hand string.
|
SFXAnsiString |
operator+(
SFXAnsiStringConstRef left
, SFXWideStringConstRef right
) Return the string obtained by adding the right-hand string to the end of the left-hand string.
|
SFXAnsiString |
operator+(
SFXAnsiStringConstRef left
, ACharConstPtr right
) Return the string obtained by adding the right-hand string to the end of the left-hand string.
|
SFXAnsiString |
operator+(
SFXAnsiStringConstRef left
, WCharConstPtr right
) Return the string obtained by adding the right-hand string to the end of the left-hand string.
|
SFXAnsiString |
operator+(
ACharConstPtr left
, SFXAnsiStringConstRef right
) Return the string obtained by adding the right-hand string to the end of the left-hand string.
|
SFXAnsiString |
operator+(
WCharConstPtr left
, SFXAnsiStringConstRef right
) Return the string obtained by adding the right-hand string to the end of the left-hand string.
|
SFXAnsiString |
operator+(
SFXAnsiStringConstRef left
, AChar right
) Return the string obtained by adding the right-hand string to the end of the left-hand string.
|
SFXAnsiString |
operator+(
AChar left
, SFXAnsiStringConstRef right
) Return the string obtained by adding the right-hand string to the end of the left-hand string.
|
Types |
---|
DefaultEnum Constants that represent the default values for the minimum size and the cluster size of the internal buffer memory. [in bytes]
|
Global Functions | |
---|---|
Bool |
operator==(
SFXAnsiStringConstRef left
, SFXAnsiStringConstRef right
) Check whether or not the left-hand string is the same with the right-hand string.
|
Bool |
operator==(
SFXAnsiStringConstRef left
, SFXWideStringConstRef right
) Check whether or not the left-hand string is the same with the right-hand string.
|
Bool |
operator==(
SFXAnsiStringConstRef left
, ACharConstPtr right
) Check whether or not the left-hand string is the same with the right-hand string.
|
Bool |
operator==(
SFXAnsiStringConstRef left
, WCharConstPtr right
) Check whether or not the left-hand string is the same with the right-hand string.
|
Bool |
operator==(
ACharConstPtr left
, SFXAnsiStringConstRef right
) Check whether or not the left-hand string is the same with the right-hand string.
|
Bool |
operator==(
WCharConstPtr left
, SFXAnsiStringConstRef right
) Check whether or not the left-hand string is the same with the right-hand string.
|
Bool |
operator>=(
SFXAnsiStringConstRef left
, SFXAnsiStringConstRef right
) Check whether or not the left-hand string is greater than or equals the right-hand string.
|
Bool |
operator>=(
SFXAnsiStringConstRef left
, SFXWideStringConstRef right
) Check whether or not the left-hand string is greater than or equals the right-hand string.
|
Bool |
operator>=(
SFXAnsiStringConstRef left
, ACharConstPtr right
) Check whether or not the left-hand string is greater than or equals the right-hand string.
|
Bool |
operator>=(
SFXAnsiStringConstRef left
, WCharConstPtr right
) Check whether or not the left-hand string is greater than or equals the right-hand string.
|
Bool |
operator>=(
ACharConstPtr left
, SFXAnsiStringConstRef right
) Check whether or not the left-hand string is greater than or equals the right-hand string.
|
Bool |
operator>=(
WCharConstPtr left
, SFXAnsiStringConstRef right
) Check whether or not the left-hand string is greater than or equals the right-hand string.
|
Bool |
operator>(
SFXAnsiStringConstRef left
, SFXAnsiStringConstRef right
) Check whether or not the left-hand string is greater than the right-hand string.
|
Bool |
operator>(
SFXAnsiStringConstRef left
, SFXWideStringConstRef right
) Check whether or not the left-hand string is greater than the right-hand string.
|
Bool |
operator>(
SFXAnsiStringConstRef left
, ACharConstPtr right
) Check whether or not the left-hand string is greater than the right-hand string.
|
Bool |
operator>(
SFXAnsiStringConstRef left
, WCharConstPtr right
) Check whether or not the left-hand string is greater than the right-hand string.
|
Bool |
operator>(
ACharConstPtr left
, SFXAnsiStringConstRef right
) Check whether or not the left-hand string is greater than the right-hand string.
|
Bool |
operator>(
WCharConstPtr left
, SFXAnsiStringConstRef right
) Check whether or not the left-hand string is greater than the right-hand string.
|
Bool |
operator<=(
SFXAnsiStringConstRef left
, SFXAnsiStringConstRef right
) Check whether or not the left-hand string is less than or equals the right-hand string.
|
Bool |
operator<=(
SFXAnsiStringConstRef left
, SFXWideStringConstRef right
) Check whether or not the left-hand string is less than or equals the right-hand string.
|
Bool |
operator<=(
SFXAnsiStringConstRef left
, ACharConstPtr right
) Check whether or not the left-hand string is less than or equals the right-hand string.
|
Bool |
operator<=(
SFXAnsiStringConstRef left
, WCharConstPtr right
) Check whether or not the left-hand string is less than or equals the right-hand string.
|
Bool |
operator<=(
ACharConstPtr left
, SFXAnsiStringConstRef right
) Check whether or not the left-hand string is less than or equals the right-hand string.
|
Bool |
operator<=(
WCharConstPtr left
, SFXAnsiStringConstRef right
) Check whether or not the left-hand string is less than or equals the right-hand string.
|
Bool |
operator<(
SFXAnsiStringConstRef left
, SFXAnsiStringConstRef right
) Check whether or not the left-hand string is less than the right-hand string.
|
Bool |
operator<(
SFXAnsiStringConstRef left
, SFXWideStringConstRef right
) Check whether or not the left-hand string is less than the right-hand string.
|
Bool |
operator<(
SFXAnsiStringConstRef left
, ACharConstPtr right
) Check whether or not the left-hand string is less than the right-hand string.
|
Bool |
operator<(
SFXAnsiStringConstRef left
, WCharConstPtr right
) Check whether or not the left-hand string is less than the right-hand string.
|
Bool |
operator<(
ACharConstPtr left
, SFXAnsiStringConstRef right
) Check whether or not the left-hand string is less than the right-hand string.
|
Bool |
operator<(
WCharConstPtr left
, SFXAnsiStringConstRef right
) Check whether or not the left-hand string is less than the right-hand string.
|
SFXAnsiString |
operator-(
SFXAnsiStringConstRef left
, SFXAnsiStringConstRef right
) Return the string obtained by deleting the right-hand string from the end of the left-hand string.
|
SFXAnsiString |
operator-(
SFXAnsiStringConstRef left
, SFXWideStringConstRef right
) Return the string obtained by deleting the right-hand string from the end of the left-hand string.
|
SFXAnsiString |
operator-(
SFXAnsiStringConstRef left
, ACharConstPtr right
) Return the string obtained by deleting the right-hand string from the end of the left-hand string.
|
SFXAnsiString |
operator-(
SFXAnsiStringConstRef left
, WCharConstPtr right
) Return the string obtained by deleting the right-hand string from the end of the left-hand string.
|
SFXAnsiString |
operator-(
ACharConstPtr left
, SFXAnsiStringConstRef right
) Return the string obtained by deleting the right-hand string from the end of the left-hand string.
|
SFXAnsiString |
operator-(
WCharConstPtr left
, SFXAnsiStringConstRef right
) Return the string obtained by deleting the right-hand string from the end of the left-hand string.
|
SFXAnsiString |
operator-(
SFXAnsiStringConstRef left
, AChar right
) Return the string obtained by deleting the right-hand string from the end of the left-hand string.
|
SFXAnsiString |
operator-(
AChar left
, SFXAnsiStringConstRef right
) Return the string obtained by deleting the right-hand string from the end of the left-hand string.
|
SFXAnsiString |
operator*(
SFXAnsiStringConstRef left
, SInt32 right
) Return the string obtained by repeating the left-hand string by the right-hand times.
|
Bool |
operator!=(
SFXAnsiStringConstRef left
, SFXAnsiStringConstRef right
) Check whether or not the left-hand string is different from the right-hand string.
|
Bool |
operator!=(
SFXAnsiStringConstRef left
, SFXWideStringConstRef right
) Check whether or not the left-hand string is different from the right-hand string.
|
Bool |
operator!=(
SFXAnsiStringConstRef left
, ACharConstPtr right
) Check whether or not the left-hand string is different from the right-hand string.
|
Bool |
operator!=(
SFXAnsiStringConstRef left
, WCharConstPtr right
) Check whether or not the left-hand string is different from the right-hand string.
|
Bool |
operator!=(
ACharConstPtr left
, SFXAnsiStringConstRef right
) Check whether or not the left-hand string is different from the right-hand string.
|
Bool |
operator!=(
WCharConstPtr left
, SFXAnsiStringConstRef right
) Check whether or not the left-hand string is different from the right-hand string.
|
SFXAnsiString |
operator+(
SFXAnsiStringConstRef left
, SFXAnsiStringConstRef right
) Return the string obtained by adding the right-hand string to the end of the left-hand string.
|
SFXAnsiString |
operator+(
SFXAnsiStringConstRef left
, SFXWideStringConstRef right
) Return the string obtained by adding the right-hand string to the end of the left-hand string.
|
SFXAnsiString |
operator+(
SFXAnsiStringConstRef left
, ACharConstPtr right
) Return the string obtained by adding the right-hand string to the end of the left-hand string.
|
SFXAnsiString |
operator+(
SFXAnsiStringConstRef left
, WCharConstPtr right
) Return the string obtained by adding the right-hand string to the end of the left-hand string.
|
SFXAnsiString |
operator+(
ACharConstPtr left
, SFXAnsiStringConstRef right
) Return the string obtained by adding the right-hand string to the end of the left-hand string.
|
SFXAnsiString |
operator+(
WCharConstPtr left
, SFXAnsiStringConstRef right
) Return the string obtained by adding the right-hand string to the end of the left-hand string.
|
SFXAnsiString |
operator+(
SFXAnsiStringConstRef left
, AChar right
) Return the string obtained by adding the right-hand string to the end of the left-hand string.
|
SFXAnsiString |
operator+(
AChar left
, SFXAnsiStringConstRef right
) Return the string obtained by adding the right-hand string to the end of the left-hand string.
|
[ public, explicit ] SFXAnsiString(Void);
[ public ] SFXAnsiString( SFXAnsiStringConstRef string // SFXAnsiString string to copy );
[ public ] SFXAnsiString( SFXWideStringConstRef string // SFXWideString string to copy );
[ public ] SFXAnsiString( ACharConstPtr string // pointer to the AChar string to copy SInt32 length = -1 // length of the AChar string );
[ public ] SFXAnsiString( WCharConstPtr string // pointer to the WChar string to copy SInt32 length = -1 // length of the WChar string to copy );
[ public, explicit ] SFXAnsiString( AChar character // character to set );
[ public, explicit ] SFXAnsiString( SFXBufferConstRef buffer // SFXBuffer buffer to copy );
[ public, explicit ] SFXAnsiString( UInt16 threshold // mininum size of the internal buffer memory UInt16 cluster // cluster size of the internal buffer memory );
If a string, character or buffer is specified in the argument, this constructer will set this string to the specified values by calling the SFXAnsiString::Set function internally.
If the cluster argument and the threshold argument are specified, the cluster size and the mininum size of the internal buffer memory will be set to the specified values by calling the SFXAnsiString::SetCluster function the SFXAnsiString::SetThreshold function internally.
[ public ] ~SFXAnsiString(Void);
This destructor releases the internal buffer memory of this string.
[ 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 this string.
If the pointer to the AChar string is specified as an argument, the specified string will be regarded as the null-terminated string. Moreover, by specifying the length argument, a string including several null('\0') characters can be specified.
Note | |
---|---|
The value that is less than or equals the length of the string specified in the string argument must be specified in the length argument. If a negative value is specified, the length of the null-terminated string specified in the string argument will be assumed to be set. The default value of the length argument is "-1". |
Tip | |
---|---|
This function influences the content of this 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);
This string converted to lower case
This function gets this string converted to lower case.
Note | |
---|---|
This string will not be modified after this function is executed. |
[ public, const ] SInt32 AsSInt32( SInt32 substitute = 0 // the value when the conversion is failed );
Integer of the SInt32 type converted from this string
This function converts this string into the integer of the SInt32 type.
The " " chraracter in the head of this string will be ignored. The "+" or "-" character can be permitted to be placed at most once before the numeric string. If omitted, the numeric string will be regarded as the positive integer.
Tip | |
---|---|
If this conversion fails since characters other than " ", "+", "-", or number are included in this string, the value specified in the substitute argument will be returned. |
[ public, const ] UInt32 AsUInt32( UInt32 substitute = 0 // the value when the conversion is failed );
Integer of the UInt32 type converted from this string
This function converts this string into the integer of the UInt32 type.
The " " chraracter in the head of this string will be ignored. The "+" character can be permitted to be placed at most once before the numeric string.
Tip | |
---|---|
If this conversion fails since characters other than " ", "+", or number are included in this string, the value specified in the substitute argument will be returned. For instance, in case the "-" character appears before the numeric string, this conversion will fail. |
[ public, const ] SFXAnsiString AsUpper(Void);
This string converted to upper case
This function gets this string converted to upper case.
Note | |
---|---|
This string will not be modified after this function is executed. |
[ 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 executed, 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);
This function clears this string.
Note | |
---|---|
The memory area allocated to this string before this function is executed will be released. |
[ 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 );
This function compares this string with the specified string in dictionary order.
Tip | |
---|---|
Case sensitive comparison can be specified in the sensitive argument. |
[ public, const ] SFXAnsiString Concat( SFXAnsiStringConstRef string // string to concatenate );
[ public, const ] SFXAnsiString Concat( ACharConstPtr string // string to concatenate SInt32 length = -1 // length of the string );
[ public, const ] SFXAnsiString Concat( AChar character // character to concatenate );
String obtained by concatenating this string and the specified string.
This function gets the string obtained by concatenating this string and the specified string.
If the pointer to the AChar string is specified as an argument, the specified string will be regarded as the null-terminated string. Moreover, by specifying the length argument, a string including several null('\0') characters can be specified.
Note | |
---|---|
The value that is less than or equals the length of the string specified in the string argument must be specified in the length argument. If a negative value is specified, the length of the null-terminated string specified in the string argument will be assumed to be set. The default value of the length argument is "-1". |
Tip | |
---|---|
Different from the SFXAnsiString::Add function, this string will not be modified after this function is executed. |
[ 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 );
This function overwrites the specified substring of this string with the specified string.
If the end of the copied string exceeds that of this string or the index argument points to out of this string, SFERR_INVALID_PARAM will be return. This string will not be overwritten.
If the pointer to the AChar string is specified as an argument, the specified string will be regarded as the null-terminated string. Moreover, by specifying the length argument, a string including several null('\0') characters can be specified.
Note | |
---|---|
The value that is less than or equals the length of the string specified in the string argument must be specified in the length argument. If a negative value is specified, the length of the null-terminated string specified in the string argument will be assumed to be set. The default value of the length argument is "-1". |
[ 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);
Empty string
This function gets the empty string.
Tip | |
---|---|
This function will used to return the reference to the empty string as the return value of a 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 );
This function checks whether or not this string ends with the specified string.
Tip | |
---|---|
Case sensitive comparison can be specified in the sensitive argument. |
[ 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 );
This function checks whether or not this string equals the specified string.
Tip | |
---|---|
Case sensitive comparison can be specified in the sensitive argument. |
This function fills this string with the specified character.
[ 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 );
This function gets the first index of this string to match the specified value, searching from the beginning.
The index argument is used to search from other than the beginning. (The origin index is 0.)
Tip | |
---|---|
Case sensitive comparison can be specified in the sensitive argument. |
[ 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 );
This function creates a string from the specified data by using the specified format.
This function is almost the same as the printf function in C language, except that the floating-point format is not available.
Note | |
---|---|
For more details on the format, see BREW API SPRINTF. |
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 );
This function creates a string from the variable-length argument by using the specified format.
This function is almost the same as the printf function in C language, except that the floating-point format is not available.
Note | |
---|---|
For more details on the format, see BREW API SPRINTF. |
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);
Pointer to the internal buffer of this string.
This function gets the pointer to the internal buffer of this string, through which data can be written into the internal buffer.
If this string is empty, null will be returned.
Caution | |
---|---|
You should not access the position over the length returned obtained by the SFXAnsiString::GetLength function from the position that the pointer to the internal buffer of this string. |
Difference between the GetBuffer function and the GetCString function | |
---|---|
When this string is empty, the SFXAnsiString::GetCString function will return the pointer to "\0", on the other hand, the SFXAnsiString::GetBuffer function will return null. Since the pointer returned by the SFXAnsiString::GetCString function is of the const type, no data can be written into the internal buffer through this pointer. To write data into the internal buffer, use the SFXAnsiString::GetBuffer function. |
[ public, const ] ACharConstPtr GetCString(Void);
Pointer of the ACharConstPtr type to the internal buffer of this string
This function gets the pointer of the ACharConstPtr type to the internal buffer of this string, through which data cannot be written into the internal buffer.
If this string is empty, the pointer to "\0" will be returned.
Difference between the GetBuffer function and the GetCString function | |
---|---|
When this string is empty, the SFXAnsiString::GetCString function will return the pointer to "\0", on the other hand, the SFXAnsiString::GetBuffer function will return null. Since the pointer returned by the SFXAnsiString::GetCString function is of the const type, no data can be written into the internal buffer through this pointer. To write data into the internal buffer, use the SFXAnsiString::GetBuffer function. |
Character at the specified index of this string. If this string is empty or the specified index is out of range of this string , null('\0') will be returned.
This function gets the character at the specified index of this string.
Caution | |
---|---|
If this string is empty or the specified index is out of range of this string , null('\0') will be returned. |
[ public, const ] UInt16 GetCluster(Void);
Cluster size of the internal buffer memory of this string. [in bytes]
This function gets cluster size of the internal buffer memory of this string. [in bytes]
[ public, const ] SInt32 GetLength(Void);
Length(number of the characters) of this string.
This function gets the length(number of the characters) of this string.
Note | |
---|---|
If this string includes "\0", "\0" will be counted. |
SFXAnsiString str("abc\0abc", 7); int i; i = str.GetLengthCString(); // i = 3 i = str.GetLength(); // i = 7
[ public, const ] SInt32 GetLengthCString(Void);
Length(number of the characters) until the first "\0" character of this string.
This function gets the length(number of the characters) until the first "\0" character of this string.
Note | |
---|---|
The first "\0" character will not be counted. |
SFXAnsiString str("abc\0abc", 7); int i; i = str.GetLengthCString(); // i = 3 i = str.GetLength(); // i = 7
[ public, const ] UInt16 GetThreshold(Void);
Minimum size of the internal buffer memory of this string. [in bytes]
This function gets the minimum size of the internal buffer memory of this string. [in bytes]
[ 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 );
String obtained by inserting the specified string or character at the specified index of this string.
This function gets the string obtained by inserting the specified string or character at the specified index of this string.
If the index argument is less than 0, 0 will be assumed to be specified. And if the index argument is greater than or equals the length of this string, "lenght of this string" will be assumed to be specified.
Caution | |
---|---|
The content of this string will not be modified by this operation. |
[ public, const ] Bool IsAlpha(Void);
This function checks whether or not all the characters of this string are alphabetic.
Caution | |
---|---|
If this string is empty, true will be returned. |
[ public, const ] Bool IsAlphaDigit(Void);
This function checks whether or not all the characters of this string are alphanumeric.
Caution | |
---|---|
If this string is empty, true will be returned. |
[ public, const ] Bool IsAscii(Void);
This function checks whether or not all the characters of this string are ASCII.
ASCII character | |
---|---|
The code of the ASCII character is greater than or equals 0x00 and less than or equals 0x7F. |
Caution | |
---|---|
If this string is empty, true will be returned. |
[ public, const ] Bool IsControl(Void);
This function checks whether or not all the characters of this string are the control characters.
Control character | |
---|---|
The code of the control character is less than 0x20, or equals 0x7F. |
Caution | |
---|---|
If this string is empty, true will be returned. |
[ public, const ] Bool IsDigit(Void);
This function checks whether or not all the characters of this string are digit.
Caution | |
---|---|
If this string is empty, true will be returned. |
[ public, const ] Bool IsEmpty(Void);
This function checks whether or not the length of this string is 0(this string is empty).
SFXAnsiString str("\0abc", 4); Bool b; b = str.IsEmptyCString(); // b = true b = str.IsEmpty(); // b = false
[ public, const ] Bool IsEmptyCString(Void);
This function checks whether or not the first character of this string is null('\0').
SFXAnsiString str("\0abc", 4); Bool b; b = str.IsEmptyCString(); // b = true b = str.IsEmpty(); // b = false
[ public, const ] Bool IsGraph(Void);
This function checks whether or not all the characters of this string are graphic.
Graphic character | |
---|---|
The graphic character is a printable character except the space character( 0x20 ). The code of the graphic character is greater than 0x20 and less than 0x7E. |
Caution | |
---|---|
If this string is empty, true will be returned. |
[ public, const ] Bool IsHexDigit(Void);
This function checks whether or not all the characters of this string are Hex digit(digit, or a, b, c, d, e, f, A, B, C, D, E, F).
Caution | |
---|---|
If this string is empty, true will be returned. |
[ public, const ] Bool IsLower(Void);
This function checks whether or not all the characters of this string are lower-case.
Caution | |
---|---|
If this string is empty, true will be returned. |
[ public, const ] Bool IsNull(Void);
This function checks whether or not all the characters of this string are null('\0').
Caution | |
---|---|
If this string is empty, true will be returned. |
[ public, const ] Bool IsPrint(Void);
This function checks whether or not all the characters of this string are printable.
Printable character | |
---|---|
The printable character is the character that can be displayed. The code of the printable character is greater than or equals 0x20 and less than 0x7E. |
Caution | |
---|---|
If this string is empty, true will be returned. |
[ public, const ] Bool IsPunct(Void);
This function checks whether or not all the characters of this string are not space nor alphanumeric but printable.
Caution | |
---|---|
If this string is empty, true will be returned. |
[ public, const ] Bool IsSpace(Void);
This function checks whether or not all the characters of this string are space.
Space character | |
---|---|
The code of the space character including tab, line-feed, and carriage return is from 0x09 to 0x0D or 0x20. |
Caution | |
---|---|
If this string is empty, true will be returned. |
[ public, const ] Bool IsUpper(Void);
This function checks whether or not all the characters of this string are upper-case.
Caution | |
---|---|
If this string is empty, true will be returned. |
[ 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 );
This function gets the last index of this string to match the specified value, searching from the end.
The index argument is used to search from other than the end. (The origin index is 0.)
Tip | |
---|---|
Case sensitive comparison can be specified in the sensitive argument. |
This function makes this string repeated by the specified times.
This string will be updated after this function is executed. To presereve this 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) );
String obtained by removing characters in the specified range from this string.
This function gets the string obtained by removing characters in the specified range from this string.
If the begin argument is greater than or equals the end argument, no character will be removed from this string.
If the begin argument is less than 0, 0 will be assumed to be specified. And if the end argument is greater than the length of this string, "the length of this string" will be assumed to be specified.
Note | |
---|---|
This function will not change the content of this string. |
[ 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 );
String obtained by replacing the specified substring in this string with the specified string.
This function gets the string obtained by replacing the specified substring in this string with the specified string.
Note | |
---|---|
The value that is less than or equals the length of the string specified in the fstring / tstring argument must be specified in the flength / tlength argument. If a negative value is specified, the length of the string specified in the fstring / tstring argument will be assumed to be set. |
Tip | |
---|---|
Case sensitive comparison can be specified in the sensitive argument. |
Note | |
---|---|
This function will not change the content of this string. |
[ 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 the string );
[ public ] SFCError Set( WCharConstPtr string // WChar pointer of source string SInt32 length = -1 // length of the string );
[ public ] SFCError Set( AChar character // AChar character of source string );
[ public ] SFCError Set( SFXBufferConstRef buffer // buffer of source string );
This function sets this string to the specified string, character, or buffer.
If the SFXAnsiString or SFXWideString instance is specified as an argument, its string value will be copied and set.
If the pointer to the AChar or WChar string is specified as an argument, the specified string will be regarded as the null-terminated string. Moreover, by specifying the length argument, a string including several null('\0') characters can be specified.
Note | |
---|---|
The value that is less than or equals the length of the string specified in the string argument must be specified in the length argument. If a negative value is specified, the length of the null-terminated string specified in the string argument will be assumed to be set. The default value of the length argument is "-1". |
Note | |
---|---|
If this function fails due to insufficient memory, the content of this string will not be modified. |
[ public ] SFCError SetChar( SInt32 index // index where the character is set AChar character // character to set );
This function sets the specified character at the specified index of this string.
Concretely, the specified character will be set at the specified index of the internal buffer of this string.
Note | |
---|---|
If the specified index is out of range of the internal buffer of this string or this string is empty, SFERR_INVALID_PARAM will be returned. |
This function sets the minimum unit to allocate the internal buffer memory(SFXClusterHeap) of this string to the specified value. [in bytes]
Default: SFXAnsiString::DEFAULT_CLUSTER bytes
For the value of SFXAnsiString::DEFAULT_CLUSTER, see SFXAnsiString::DefaultEnum.
SFXAnsiString::GetCluster | SFXAnsiString::DefaultEnum | SFXClusterHeap::SetCluster | SFXClusterHeap
This function sets the length of this string to the specified value.
If the specified length is shorter than this string, the characters after the specified length of this string will be lost. On the other hand, if the specified length is longer than this string, this string will be extended with a null('\0') character.
This function sets the minimum memory of the internal buffer memory(SFXClusterHeap) of this string to the specified value. [in bytes]
Default: SFXAnsiString::DEFAULT_THRESHOLD bytes
For the value of SFXAnsiString::DEFAULT_THRESHOLD, see 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 );
This function checks whether or not this string starts with the specified string.
[ public ] SFCError Sub( SFXAnsiStringConstRef string // string to delete );
[ public ] SFCError Sub( ACharConstPtr string // string to delete SInt32 length = -1 // length of the string );
[ public ] SFCError Sub( AChar character // character to delete );
This function deletes the specified string at the end of this string.
If this string ends with the specified string, the specified string will be deleted from this string. Otherwise, nothing will happen.
If the pointer to the AChar string is specified as an argument, the specified string will be regarded as the null-terminated string. Moreover, by specifying the length argument, a string including several null('\0') characters can be specified.
Note | |
---|---|
The value that is less than or equals the length of the string specified in the string argument must be specified in the length argument. If a negative value is specified, the length of the null-terminated string specified in the string argument will be assumed to be set. The default value of the length argument is "-1". |
Tip | |
---|---|
This function influences the content of this string. If you want to keep it unmodified, use the operator- operator. |
[ public, const ] SFXAnsiString Substring( SInt32 begin // beginning index(this index is included) SInt32 end // ending index(this index is not included) );
Sub-string in the specified range of this string.
This function gets the sub-string in the specified range of this string.
The string from the ("begin" + 1)th character to the ("end")th character will be returned. Its length is (end - begin).
If the begin argument is greater than or equals the end argument, the null string is returned.
If the begin argument is less than 0, 0 will be assumed to be specified. And if the end argument is greater than the length of this string, "the length of this string" will be assumed to be specified.
Tip | |
---|---|
This string will not be modified after this function is executed. |
SFXAnsiString str1("American");
SFXAnsiString str2 = str1.Substring(2, 6); // str2 = "eric"
[ public ] Void ToLower(Void);
This function converts this string to lower-case.
Note | |
---|---|
This function influences the content of this string. If you want to keep it unmodified, use the SFXAnsiString::AsLower function. |
[ public ] Void ToUpper(Void);
This function converts this string to upper-case.
Note | |
---|---|
This function influences the content of this string. If you want to keep it unmodified, 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);
String obtained by trimming the blank characters or the specified string/character from the head and tail of this string.
This function gets the string obtained by trimming the blank characters or the specified string/character from the head and tail of this string.
If no argument is specified, the blank characters(space, tab, vertical tab, linefeed, return, formfeed) will be trimmed from the head and tail of this string.
If arguments are specified, the specified string/character will be trimmed from the head and tail of this string.
Tip | |
---|---|
Case sensitive comparison can be specified in the sensitive argument. |
Note | |
---|---|
This function will not change the content of this string. |
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);
String obtained by trimming the blank characters or the specified string/character from the head of this string.
This function gets the string obtained by trimming the blank characters or the specified string/character from the head of this string.
If no argument is specified, the blank characters(space, tab, vertical tab, linefeed, return, formfeed) will be trimmed from the head of this string.
If arguments are specified, the specified string/character will be trimmed from the head of this string.
Tip | |
---|---|
Case sensitive comparison can be specified in the sensitive argument. |
Note | |
---|---|
This function will not change the content of this string. |
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);
String obtained by trimming the blank characters or the specified string/character from the tail of this string.
This function gets the string obtained by trimming the blank characters or the specified string/character from the tail of this string.
If no argument is specified, the blank characters(space, tab, vertical tab, linefeed, return, formfeed) will be trimmed from the tail of this string.
If arguments are specified, the specified string/character will be trimmed from the tail of this string.
Tip | |
---|---|
Case sensitive comparison can be specified in the sensitive argument. |
Note | |
---|---|
This function will not change the content of this string. |
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);
String until the first null('\0') character of this string.
Note | |
---|---|
This function will not change the content of this string. |
This function gets the string until the first null('\0') character of this string.
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 );
This operator assigns the right-hand string to the left-hand string.
If the SFXAnsiString or SFXWideString instance is specified as the right-hand string, it will be copied and assigned.
If the pointer to the AChar or WChar string is specified as the right-hand string, it will be regarded as the null-terminated string.
Tip | |
---|---|
This operator influences the content of the left-hand string. |
[ 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 );
This operator checks whether or not the left-hand string is the same with the right-hand string.
[ 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 );
This operator checks whether or not the left-hand string is greater than or equals the right-hand string.
[ 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 );
This operator checks whether or not the left-hand string is greater than the right-hand string.
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 );
This operator gets the character at the right-hand index of the left-hand string.
Caution | |
---|---|
If the left-hand string is empty or the right-hand index is out of range of the left-hand string, null('\0') will be returned. |
[ 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 );
This operator adds the right-hand string to the end of the left-hand string.
Tip | |
---|---|
This operator influences the content of the left-hand string. This operator is very useful to concatenate multiple strings. |
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 );
This operator checks whether or not the left-hand string is less than or equals the right-hand string.
[ 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 );
This operator checks whether or not the left-hand string is less than the right-hand string.
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 );
This operator deletes the right-hand string from the end of the left-hand string.
If the right-hand string exists at the end of the left-hand string, the right-hand string will be deleted from the end of the left-hand string.
Otherwise, nothing will happen.
Tip | |
---|---|
This operator influences the content of the left-hand string. |
[ 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 );
This operator returns the string obtained by deleting the right-hand string from the end of the left-hand string.
If the right-hand string exists at the end of the left-hand string, the string by deleting the right-hand string from the end of the left-hand string will be returned.
Otherwise, the left-hand string at it is will be returned.
SFXAnsiString str1("Hello World");
SFXAnsiString str2(" World");
SFXAnsiString str3 = str1 - str2; // str3 = "Hello"
[ public ] SFXAnsiStringRef operator*=( SInt32 repeat // times to repeat );
This operator repeats the left-hand string by the right-hand times.
Tip | |
---|---|
This operator influences the content of the left-hand string. |
[ public, friend ] SFXAnsiString operator*( SFXAnsiStringConstRef left // string to repeat SInt32 right // times to repeat );
This operator returns the string obtained by repeating the left-hand string by the right-hand times.
[ 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 );
This operator checks whether or not the left-hand string is different from the right-hand string.
[ public ] SFXAnsiStringRef operator+=( SFXAnsiStringConstRef string // string to add );
[ public ] SFXAnsiStringRef operator+=( ACharConstPtr string // string to add );
[ public ] SFXAnsiStringRef operator+=( AChar character // 追加する文字 );
This operator adds the right-hand string to the end of the left-hand string.
Tip | |
---|---|
This operator influences the content of the left-hand string. |
[ 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 );
This operator returns the string obtained by adding the right-hand string to the end of the left-hand string.
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 - 2024 Sophia Cradle Incorporated All Rights Reserved. |