PrevNextUpHome SophiaFramework UNIVERSE 5.3
SFXWideString
Class which represents the string of the WChar type.
#include <SFXWideString.h.hpp>
class SFXWideString;
SFMTYPEDEFCLASS(SFXWideString)

Collaboration diagram

 Collaboration diagram of SFXWideStringClass

Description

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 847. Method 1: Substitute an empty string or call the SFXWideString::SetLength function:

SFXWideString str = "The best C++ Programming Environment for BREW";

str = ";
// OR:
str.SetLength(0);

// the heap is not released

Example 848. Method 2: Call the Clear Function:

SFXWideString 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 SFXWideString::SetLength function is more efficient.

SFXWideString str;

str = "BREW";
...
str.SetLength(0);
...
str = "C++";
...
str.SetLength(0);
...
str = "GUI";
...
str.SetLength(0);
...
str = "XML";
...

Attach Function and Detach Function

The SFXWideString::Attach function attaches the string area to the SFXWideString object. The SFXWideString::Detach function has the reverse functionality.

Though the data is copied by using the SFXWideString::Set function and the substitution operator(=), while using the SFXWideString::Attach function and the SFXWideString::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.

Reference

SFXWideString | SFXBuffer | Character Type

Member

Constructor/Destructor
SFXWideString( Void )
Constructor of the SFXWideString class.
SFXWideString( SFXWideStringConstRef string )
Constructor of the SFXWideString class.
SFXWideString( SFXWideStringConstRef string )
Constructor of the SFXWideString class.
SFXWideString( ACharConstPtr string , SInt32 length = -1 )
Constructor of the SFXWideString class.
SFXWideString( WCharConstPtr string , SInt32 length = -1 )
Constructor of the SFXWideString class.
SFXWideString( WChar character )
Constructor of the SFXWideString class.
SFXWideString( SFXBufferConstRef buffer )
Constructor of the SFXWideString class.
SFXWideString( UInt16 threshold , UInt16 cluster )
Constructor of the SFXWideString class.
~SFXWideString( Void )
Destructor of the SFXWideString class.
Public Functions
SFCError Add( SFXWideStringConstRef string )
Add the specified string to the end of this string.
SFCError Add( WCharConstPtr string , SInt32 length = -1 )
Add the specified string to the end of this string.
SFCError Add( WChar character )
Add the specified string to the end of this string.
SFXWideString 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.
SFXWideString AsUpper( Void )
Get this string converted to upper case.
SFCError Attach( SFXWideStringPtr string )
Attach the specified string to this string object.
SFCError Attach( WCharPtr 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( SFXWideStringConstRef string , Bool sensitive = true )
Compare this string with the specified string in dictionary order.
SInt32 Compare( WCharConstPtr string , Bool sensitive = true )
Compare this string with the specified string in dictionary order.
SFXWideString Concat( SFXWideStringConstRef string )
Get the string obtained by concatenating this string and the specified string.
SFXWideString Concat( WCharConstPtr string , SInt32 length = -1 )
Get the string obtained by concatenating this string and the specified string.
SFXWideString Concat( WChar character )
Get the string obtained by concatenating this string and the specified string.
SFCError Copy( SInt32 index , SFXWideStringConstRef string )
Overwrite the specified substring of this string with the specified string.
SFCError Copy( SInt32 index , WCharConstPtr string , SInt32 length = -1 )
Overwrite the specified substring of this string with the specified string.
SFCError Detach( SFXWideStringPtr string )
Detach the string area from this string object.
WCharPtr 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
SFXWideStringConstRef
EmptyInstance( Void )
Get the empty string.
Bool EndsWith( SFXWideStringConstRef string , Bool sensitive = true )
Check whether the string ends with the specified string or not.
Bool EndsWith( WCharConstPtr string , Bool sensitive = true )
Check whether the string ends with the specified string or not.
Bool EndsWith( WChar character , Bool sensitive = true )
Check whether the string ends with the specified string or not.
Bool Equals( SFXWideStringConstRef string , Bool sensitive = true )
Check whether or not this string equals the specified string.
Bool Equals( WCharConstPtr string , Bool sensitive = true )
Check whether or not this string equals the specified string.
Void Fill( WChar character )
Fill this string with specified character.
SInt32 FirstIndexOf( SFXWideStringConstRef 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( WCharConstPtr 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( WChar 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
SFXWideString
Format( va_ref< SFXWideStringConst > format , ... )
Create a string from the specified data by using the specified format.
static
SFXWideString
Format( va_ref< SFXWideStringConst > format , ... )
Create a string from the specified data by using the specified format.
static
SFXWideString
Format( WCharConstPtr format , ... )
Create a string from the specified data by using the specified format.
static
SFXWideString
Format( WCharConstPtr format , ... )
Create a string from the specified data by using the specified format.
static
SFXWideString
FormatV( SFXWideStringConstRef format , va_list argument )
Create a string from the variable-length argument by using the specified format.
static
SFXWideString
FormatV( SFXWideStringConstRef format , va_list argument )
Create a string from the variable-length argument by using the specified format.
static
SFXWideString
FormatV( WCharConstPtr format , va_list argument )
Create a string from the variable-length argument by using the specified format.
static
SFXWideString
FormatV( WCharConstPtr format , va_list argument )
Create a string from the variable-length argument by using the specified format.
WCharPtr GetBuffer( Void )
Get the pointer to the internal buffer of this string.
WCharConstPtr GetBuffer( Void )
Get the pointer to the internal buffer of this string.
WCharConstPtr GetCString( Void )
Get the const pointer to the internal buffer of this string.
WChar 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]
SFXWideString Insert( SInt32 index , SFXWideStringConstRef string )
Get the string obtained by inserting the specified string or character at the specified index of this string.
SFXWideString Insert( SInt32 index , WCharConstPtr string , SInt32 length = -1 )
Get the string obtained by inserting the specified string or character at the specified index of this string.
SFXWideString Insert( SInt32 index , WChar 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 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.
Bool Isnull( Void )
Check whether or not all the characters of this string are null('\0').
SInt32 LastIndexOf( SFXWideStringConstRef 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( WCharConstPtr 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( WChar 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.
SFXWideString Remove( SInt32 begin , SInt32 end )
Get the string obtained by removing characters in the specified range from this string.
SFXWideString Replace( SFXWideStringConstRef fstring , SFXWideStringConstRef tstring , Bool sensitive = true )
Get the string obtained by replacing the specified substring in this string with the specified string.
SFXWideString Replace( SFXWideStringConstRef fstring , WCharConstPtr tstring , Bool sensitive = true )
Get the string obtained by replacing the specified substring in this string with the specified string.
SFXWideString Replace( SFXWideStringConstRef fstring , WCharConstPtr tstring , SInt32 tlength , Bool sensitive = true )
Get the string obtained by replacing the specified substring in this string with the specified string.
SFXWideString Replace( WCharConstPtr fstring , SFXWideStringConstRef tstring , Bool sensitive = true )
Get the string obtained by replacing the specified substring in this string with the specified string.
SFXWideString Replace( WCharConstPtr fstring , SInt32 flength , SFXWideStringConstRef tstring , Bool sensitive = true )
Get the string obtained by replacing the specified substring in this string with the specified string.
SFXWideString Replace( WCharConstPtr fstring , WCharConstPtr tstring , Bool sensitive = true )
Get the string obtained by replacing the specified substring in this string with the specified string.
SFXWideString Replace( WCharConstPtr fstring , SInt32 flength , WCharConstPtr tstring , SInt32 tlength , Bool sensitive = true )
Get the string obtained by replacing the specified substring in this string with the specified string.
SFXWideString Replace( SFXWideStringConstRef fstring , WChar tcharacter , Bool sensitive = true )
Get the string obtained by replacing the specified substring in this string with the specified string.
SFXWideString Replace( WChar fcharacter , SFXWideStringConstRef tstring , Bool sensitive = true )
Get the string obtained by replacing the specified substring in this string with the specified string.
SFXWideString Replace( WChar fcharacter , WChar tcharacter , Bool sensitive = true )
Get the string obtained by replacing the specified substring in this string with the specified string.
SFXWideString Replace( WCharConstPtr fstring , WChar tcharacter , Bool sensitive = true )
Get the string obtained by replacing the specified substring in this string with the specified string.
SFXWideString Replace( WCharConstPtr fstring , SInt32 flength , WChar tcharacter , Bool sensitive = true )
Get the string obtained by replacing the specified substring in this string with the specified string.
SFXWideString Replace( WChar fcharacter , WCharConstPtr tstring , Bool sensitive = true )
Get the string obtained by replacing the specified substring in this string with the specified string.
SFXWideString Replace( WChar fcharacter , WCharConstPtr tstring , SInt32 tlength , Bool sensitive = true )
Get the string obtained by replacing the specified substring in this string with the specified string.
SFCError Set( SFXWideStringConstRef 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( WCharConstPtr 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( WChar 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 , WChar 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( SFXWideStringConstRef string , Bool sensitive = true )
Check whether or not this string starts with the specified string.
Bool StartsWith( WCharConstPtr string , Bool sensitive = true )
Check whether or not this string starts with the specified string.
Bool StartsWith( WChar character , Bool sensitive = true )
Check whether or not this string starts with the specified string.
SFCError Sub( SFXWideStringConstRef string )
Delete the specified string at the end of this string.
SFCError Sub( WCharConstPtr string , SInt32 length = -1 )
Delete the specified string at the end of this string.
SFCError Sub( WChar character )
Delete the specified string at the end of this string.
SFXWideString 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.
SFXWideString Trim( SFXWideStringConstRef 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.
SFXWideString Trim( WCharConstPtr 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.
SFXWideString Trim( WChar 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.
SFXWideString Trim( Void )
Get the string obtained by trimming the blank characters or the specified string/character from the head and tail of this string.
SFXWideString TrimLeft( SFXWideStringConstRef string , Bool sensitive = true )
Get the string obtained by trimming the blank characters or the specified string/character from the head of this string.
SFXWideString TrimLeft( WCharConstPtr string , Bool sensitive = true )
Get the string obtained by trimming the blank characters or the specified string/character from the head of this string.
SFXWideString TrimLeft( WChar character , Bool sensitive = true )
Get the string obtained by trimming the blank characters or the specified string/character from the head of this string.
SFXWideString TrimLeft( Void )
Get the string obtained by trimming the blank characters or the specified string/character from the head of this string.
SFXWideString TrimRight( SFXWideStringConstRef string , Bool sensitive = true )
Get the string obtained by trimming the blank characters or the specified string/character from the tail of this string.
SFXWideString TrimRight( WCharConstPtr string , Bool sensitive = true )
Get the string obtained by trimming the blank characters or the specified string/character from the tail of this string.
SFXWideString TrimRight( WChar character , Bool sensitive = true )
Get the string obtained by trimming the blank characters or the specified string/character from the tail of this string.
SFXWideString TrimRight( Void )
Get the string obtained by trimming the blank characters or the specified string/character from the tail of this string.
SFXWideString Truncate( Void )
Get the string until the first null('\0') character of this string.
SFXWideStringRef operator*=( SInt32 repeat )
Repeat the left-hand string by the right-hand times.
SFXWideStringRef operator+=( SFXWideStringConstRef string )
Add the right-hand string to the end of the left-hand string.
SFXWideStringRef operator+=( WCharConstPtr string )
Add the right-hand string to the end of the left-hand string.
SFXWideStringRef operator+=( WChar character )
Add the right-hand string to the end of the left-hand string.
SFXWideStringRef operator-=( SFXWideStringConstRef string )
Delete the right-hand string from the end of the left-hand string.
SFXWideStringRef operator-=( WCharConstPtr string )
Delete the right-hand string from the end of the left-hand string.
SFXWideStringRef operator-=( WChar character )
Delete the right-hand string from the end of the left-hand string.
SFXWideStringRef operator<<( SFXWideStringRef left , SFXWideStringConstRef right )
Add the right-hand string to the end of the left-hand string.
SFXWideStringRef operator<<( SFXWideStringRef left , SFXWideStringConstRef right )
Add the right-hand string to the end of the left-hand string.
SFXWideStringRef operator<<( SFXWideStringRef left , WCharConstPtr right )
Add the right-hand string to the end of the left-hand string.
SFXWideStringRef operator<<( SFXWideStringRef left , WCharConstPtr right )
Add the right-hand string to the end of the left-hand string.
SFXWideStringRef operator<<( SFXWideStringRef left , WChar right )
Add the right-hand string to the end of the left-hand string.
SFXWideStringRef operator=( SFXWideStringConstRef string )
Assign the right-hand string to the left-hand string.
SFXWideStringRef operator=( SFXWideStringConstRef string )
Assign the right-hand string to the left-hand string.
SFXWideStringRef operator=( ACharConstPtr string )
Assign the right-hand string to the left-hand string.
SFXWideStringRef operator=( WCharConstPtr string )
Assign the right-hand string to the left-hand string.
WCharRef operator[]( SInt32 index )
Get the character at the right-hand index of the left-hand string.
WCharConstRef operator[]( SInt32 index )
Get the character at the right-hand index of the left-hand string.
Bool operator==( SFXWideStringConstRef left , SFXWideStringConstRef right )
Check whether or not the left-hand string is the same with the right-hand string.
Bool operator==( SFXWideStringConstRef left , SFXWideStringConstRef right )
Check whether or not the left-hand string is the same with the right-hand string.
Bool operator==( SFXWideStringConstRef left , WCharConstPtr right )
Check whether or not the left-hand string is the same with the right-hand string.
Bool operator==( SFXWideStringConstRef left , WCharConstPtr right )
Check whether or not the left-hand string is the same with the right-hand string.
Bool operator==( WCharConstPtr left , SFXWideStringConstRef right )
Check whether or not the left-hand string is the same with the right-hand string.
Bool operator==( WCharConstPtr left , SFXWideStringConstRef right )
Check whether or not the left-hand string is the same with the right-hand string.
Bool operator>=( SFXWideStringConstRef left , SFXWideStringConstRef right )
Check whether or not the left-hand string is greater than or equals the right-hand string.
Bool operator>=( SFXWideStringConstRef left , SFXWideStringConstRef right )
Check whether or not the left-hand string is greater than or equals the right-hand string.
Bool operator>=( SFXWideStringConstRef left , WCharConstPtr right )
Check whether or not the left-hand string is greater than or equals the right-hand string.
Bool operator>=( SFXWideStringConstRef left , WCharConstPtr right )
Check whether or not the left-hand string is greater than or equals the right-hand string.
Bool operator>=( WCharConstPtr left , SFXWideStringConstRef right )
Check whether or not the left-hand string is greater than or equals the right-hand string.
Bool operator>=( WCharConstPtr left , SFXWideStringConstRef right )
Check whether or not the left-hand string is greater than or equals the right-hand string.
Bool operator>( SFXWideStringConstRef left , SFXWideStringConstRef right )
Check whether or not the left-hand string is greater than the right-hand string.
Bool operator>( SFXWideStringConstRef left , SFXWideStringConstRef right )
Check whether or not the left-hand string is greater than the right-hand string.
Bool operator>( SFXWideStringConstRef left , WCharConstPtr right )
Check whether or not the left-hand string is greater than the right-hand string.
Bool operator>( SFXWideStringConstRef left , WCharConstPtr right )
Check whether or not the left-hand string is greater than the right-hand string.
Bool operator>( WCharConstPtr left , SFXWideStringConstRef right )
Check whether or not the left-hand string is greater than the right-hand string.
Bool operator>( WCharConstPtr left , SFXWideStringConstRef right )
Check whether or not the left-hand string is greater than the right-hand string.
Bool operator<=( SFXWideStringConstRef left , SFXWideStringConstRef right )
Check whether or not the left-hand string is less than or equals the right-hand string.
Bool operator<=( SFXWideStringConstRef left , SFXWideStringConstRef right )
Check whether or not the left-hand string is less than or equals the right-hand string.
Bool operator<=( SFXWideStringConstRef left , WCharConstPtr right )
Check whether or not the left-hand string is less than or equals the right-hand string.
Bool operator<=( SFXWideStringConstRef left , WCharConstPtr right )
Check whether or not the left-hand string is less than or equals the right-hand string.
Bool operator<=( WCharConstPtr left , SFXWideStringConstRef right )
Check whether or not the left-hand string is less than or equals the right-hand string.
Bool operator<=( WCharConstPtr left , SFXWideStringConstRef right )
Check whether or not the left-hand string is less than or equals the right-hand string.
Bool operator<( SFXWideStringConstRef left , SFXWideStringConstRef right )
Check whether or not the left-hand string is less than the right-hand string.
Bool operator<( SFXWideStringConstRef left , SFXWideStringConstRef right )
Check whether or not the left-hand string is less than the right-hand string.
Bool operator<( SFXWideStringConstRef left , WCharConstPtr right )
Check whether or not the left-hand string is less than the right-hand string.
Bool operator<( SFXWideStringConstRef left , WCharConstPtr right )
Check whether or not the left-hand string is less than the right-hand string.
Bool operator<( WCharConstPtr left , SFXWideStringConstRef right )
Check whether or not the left-hand string is less than the right-hand string.
Bool operator<( WCharConstPtr left , SFXWideStringConstRef right )
Check whether or not the left-hand string is less than the right-hand string.
SFXWideString operator-( SFXWideStringConstRef left , SFXWideStringConstRef right )
Return the string obtained by deleting the right-hand string from the end of the left-hand string.
SFXWideString operator-( SFXWideStringConstRef left , SFXWideStringConstRef right )
Return the string obtained by deleting the right-hand string from the end of the left-hand string.
SFXWideString operator-( SFXWideStringConstRef left , WCharConstPtr right )
Return the string obtained by deleting the right-hand string from the end of the left-hand string.
SFXWideString operator-( SFXWideStringConstRef left , WCharConstPtr right )
Return the string obtained by deleting the right-hand string from the end of the left-hand string.
SFXWideString operator-( WCharConstPtr left , SFXWideStringConstRef right )
Return the string obtained by deleting the right-hand string from the end of the left-hand string.
SFXWideString operator-( WCharConstPtr left , SFXWideStringConstRef right )
Return the string obtained by deleting the right-hand string from the end of the left-hand string.
SFXWideString operator-( SFXWideStringConstRef left , WChar right )
Return the string obtained by deleting the right-hand string from the end of the left-hand string.
SFXWideString operator-( WChar left , SFXWideStringConstRef right )
Return the string obtained by deleting the right-hand string from the end of the left-hand string.
SFXWideString operator*( SFXWideStringConstRef left , SInt32 right )
Return the string obtained by repeating the left-hand string by the right-hand times.
Bool operator!=( SFXWideStringConstRef left , SFXWideStringConstRef right )
Check whether or not the left-hand string is different from the right-hand string.
Bool operator!=( SFXWideStringConstRef left , SFXWideStringConstRef right )
Check whether or not the left-hand string is different from the right-hand string.
Bool operator!=( SFXWideStringConstRef left , WCharConstPtr right )
Check whether or not the left-hand string is different from the right-hand string.
Bool operator!=( SFXWideStringConstRef left , WCharConstPtr right )
Check whether or not the left-hand string is different from the right-hand string.
Bool operator!=( WCharConstPtr left , SFXWideStringConstRef right )
Check whether or not the left-hand string is different from the right-hand string.
Bool operator!=( WCharConstPtr left , SFXWideStringConstRef right )
Check whether or not the left-hand string is different from the right-hand string.
SFXWideString operator+( SFXWideStringConstRef left , SFXWideStringConstRef right )
Return the string obtained by adding the right-hand string to the end of the left-hand string.
SFXWideString operator+( SFXWideStringConstRef left , SFXWideStringConstRef right )
Return the string obtained by adding the right-hand string to the end of the left-hand string.
SFXWideString operator+( SFXWideStringConstRef left , WCharConstPtr right )
Return the string obtained by adding the right-hand string to the end of the left-hand string.
SFXWideString operator+( SFXWideStringConstRef left , WCharConstPtr right )
Return the string obtained by adding the right-hand string to the end of the left-hand string.
SFXWideString operator+( WCharConstPtr left , SFXWideStringConstRef right )
Return the string obtained by adding the right-hand string to the end of the left-hand string.
SFXWideString operator+( WCharConstPtr left , SFXWideStringConstRef right )
Return the string obtained by adding the right-hand string to the end of the left-hand string.
SFXWideString operator+( SFXWideStringConstRef left , WChar right )
Return the string obtained by adding the right-hand string to the end of the left-hand string.
SFXWideString operator+( WChar left , SFXWideStringConstRef 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==( SFXWideStringConstRef left , SFXWideStringConstRef right )
Check whether or not the left-hand string is the same with the right-hand string.
Bool operator==( SFXWideStringConstRef left , SFXWideStringConstRef right )
Check whether or not the left-hand string is the same with the right-hand string.
Bool operator==( SFXWideStringConstRef left , WCharConstPtr right )
Check whether or not the left-hand string is the same with the right-hand string.
Bool operator==( SFXWideStringConstRef left , WCharConstPtr right )
Check whether or not the left-hand string is the same with the right-hand string.
Bool operator==( WCharConstPtr left , SFXWideStringConstRef right )
Check whether or not the left-hand string is the same with the right-hand string.
Bool operator==( WCharConstPtr left , SFXWideStringConstRef right )
Check whether or not the left-hand string is the same with the right-hand string.
Bool operator>=( SFXWideStringConstRef left , SFXWideStringConstRef right )
Check whether or not the left-hand string is greater than or equals the right-hand string.
Bool operator>=( SFXWideStringConstRef left , SFXWideStringConstRef right )
Check whether or not the left-hand string is greater than or equals the right-hand string.
Bool operator>=( SFXWideStringConstRef left , WCharConstPtr right )
Check whether or not the left-hand string is greater than or equals the right-hand string.
Bool operator>=( SFXWideStringConstRef left , WCharConstPtr right )
Check whether or not the left-hand string is greater than or equals the right-hand string.
Bool operator>=( WCharConstPtr left , SFXWideStringConstRef right )
Check whether or not the left-hand string is greater than or equals the right-hand string.
Bool operator>=( WCharConstPtr left , SFXWideStringConstRef right )
Check whether or not the left-hand string is greater than or equals the right-hand string.
Bool operator>( SFXWideStringConstRef left , SFXWideStringConstRef right )
Check whether or not the left-hand string is greater than the right-hand string.
Bool operator>( SFXWideStringConstRef left , SFXWideStringConstRef right )
Check whether or not the left-hand string is greater than the right-hand string.
Bool operator>( SFXWideStringConstRef left , WCharConstPtr right )
Check whether or not the left-hand string is greater than the right-hand string.
Bool operator>( SFXWideStringConstRef left , WCharConstPtr right )
Check whether or not the left-hand string is greater than the right-hand string.
Bool operator>( WCharConstPtr left , SFXWideStringConstRef right )
Check whether or not the left-hand string is greater than the right-hand string.
Bool operator>( WCharConstPtr left , SFXWideStringConstRef right )
Check whether or not the left-hand string is greater than the right-hand string.
Bool operator<=( SFXWideStringConstRef left , SFXWideStringConstRef right )
Check whether or not the left-hand string is less than or equals the right-hand string.
Bool operator<=( SFXWideStringConstRef left , SFXWideStringConstRef right )
Check whether or not the left-hand string is less than or equals the right-hand string.
Bool operator<=( SFXWideStringConstRef left , WCharConstPtr right )
Check whether or not the left-hand string is less than or equals the right-hand string.
Bool operator<=( SFXWideStringConstRef left , WCharConstPtr right )
Check whether or not the left-hand string is less than or equals the right-hand string.
Bool operator<=( WCharConstPtr left , SFXWideStringConstRef right )
Check whether or not the left-hand string is less than or equals the right-hand string.
Bool operator<=( WCharConstPtr left , SFXWideStringConstRef right )
Check whether or not the left-hand string is less than or equals the right-hand string.
Bool operator<( SFXWideStringConstRef left , SFXWideStringConstRef right )
Check whether or not the left-hand string is less than the right-hand string.
Bool operator<( SFXWideStringConstRef left , SFXWideStringConstRef right )
Check whether or not the left-hand string is less than the right-hand string.
Bool operator<( SFXWideStringConstRef left , WCharConstPtr right )
Check whether or not the left-hand string is less than the right-hand string.
Bool operator<( SFXWideStringConstRef left , WCharConstPtr right )
Check whether or not the left-hand string is less than the right-hand string.
Bool operator<( WCharConstPtr left , SFXWideStringConstRef right )
Check whether or not the left-hand string is less than the right-hand string.
Bool operator<( WCharConstPtr left , SFXWideStringConstRef right )
Check whether or not the left-hand string is less than the right-hand string.
SFXWideString operator-( SFXWideStringConstRef left , SFXWideStringConstRef right )
Return the string obtained by deleting the right-hand string from the end of the left-hand string.
SFXWideString operator-( SFXWideStringConstRef left , SFXWideStringConstRef right )
Return the string obtained by deleting the right-hand string from the end of the left-hand string.
SFXWideString operator-( SFXWideStringConstRef left , WCharConstPtr right )
Return the string obtained by deleting the right-hand string from the end of the left-hand string.
SFXWideString operator-( SFXWideStringConstRef left , WCharConstPtr right )
Return the string obtained by deleting the right-hand string from the end of the left-hand string.
SFXWideString operator-( WCharConstPtr left , SFXWideStringConstRef right )
Return the string obtained by deleting the right-hand string from the end of the left-hand string.
SFXWideString operator-( WCharConstPtr left , SFXWideStringConstRef right )
Return the string obtained by deleting the right-hand string from the end of the left-hand string.
SFXWideString operator-( SFXWideStringConstRef left , WChar right )
Return the string obtained by deleting the right-hand string from the end of the left-hand string.
SFXWideString operator-( WChar left , SFXWideStringConstRef right )
Return the string obtained by deleting the right-hand string from the end of the left-hand string.
SFXWideString operator*( SFXWideStringConstRef left , SInt32 right )
Return the string obtained by repeating the left-hand string by the right-hand times.
Bool operator!=( SFXWideStringConstRef left , SFXWideStringConstRef right )
Check whether or not the left-hand string is different from the right-hand string.
Bool operator!=( SFXWideStringConstRef left , SFXWideStringConstRef right )
Check whether or not the left-hand string is different from the right-hand string.
Bool operator!=( SFXWideStringConstRef left , WCharConstPtr right )
Check whether or not the left-hand string is different from the right-hand string.
Bool operator!=( SFXWideStringConstRef left , WCharConstPtr right )
Check whether or not the left-hand string is different from the right-hand string.
Bool operator!=( WCharConstPtr left , SFXWideStringConstRef right )
Check whether or not the left-hand string is different from the right-hand string.
Bool operator!=( WCharConstPtr left , SFXWideStringConstRef right )
Check whether or not the left-hand string is different from the right-hand string.
SFXWideString operator+( SFXWideStringConstRef left , SFXWideStringConstRef right )
Return the string obtained by adding the right-hand string to the end of the left-hand string.
SFXWideString operator+( SFXWideStringConstRef left , SFXWideStringConstRef right )
Return the string obtained by adding the right-hand string to the end of the left-hand string.
SFXWideString operator+( SFXWideStringConstRef left , WCharConstPtr right )
Return the string obtained by adding the right-hand string to the end of the left-hand string.
SFXWideString operator+( SFXWideStringConstRef left , WCharConstPtr right )
Return the string obtained by adding the right-hand string to the end of the left-hand string.
SFXWideString operator+( WCharConstPtr left , SFXWideStringConstRef right )
Return the string obtained by adding the right-hand string to the end of the left-hand string.
SFXWideString operator+( WCharConstPtr left , SFXWideStringConstRef right )
Return the string obtained by adding the right-hand string to the end of the left-hand string.
SFXWideString operator+( SFXWideStringConstRef left , WChar right )
Return the string obtained by adding the right-hand string to the end of the left-hand string.
SFXWideString operator+( WChar left , SFXWideStringConstRef right )
Return the string obtained by adding the right-hand string to the end of the left-hand string.

SFXWideString::SFXWideString
Constructor of the SFXWideString class.
[ public, explicit ]
SFXWideString(Void);
[ public ]
SFXAnsiString(
    SFXWideStringConstRef string   // SFXAnsiString string to copy
);
[ public ]
SFXWideString(
    SFXWideStringConstRef string   // SFXWideString string to copy
);
[ public ]
SFXWideString(
    ACharConstPtr string   // pointer to the AChar string to copy
    SInt32 length = -1     // length of the AChar string
);
[ public ]
SFXWideString(
    WCharConstPtr string   // pointer to the WChar string to copy
    SInt32 length = -1     // length of the WChar string to copy
);
[ public, explicit ]
SFXWideString(
    WChar character   // character to set
);
[ public, explicit ]
SFXWideString(
    SFXBufferConstRef buffer   // SFXBuffer buffer to copy
);
[ public, explicit ]
SFXWideString(
    UInt16 threshold   // mininum size of the internal buffer memory
    UInt16 cluster     // cluster size of the internal buffer memory
);

Description

If a string, character or buffer is specified in the argument, this constructer will set this string to the specified values by calling the SFXWideString::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 SFXWideString::SetCluster function the SFXWideString::SetThreshold function internally.

Reference

SFXWideString::Set | SFXWideString::SetCluster | SFXWideString::SetThreshold


SFXWideString::~SFXWideString
Destructor of the SFXWideString class.
[ public ]
~SFXWideString(Void);

Description

This destructor releases the internal buffer memory of this string.


SFXWideString::Add
Add the specified string to the end of this string.
[ public ]
SFCError Add(
    SFXWideStringConstRef string   // string to add
);
[ public ]
SFCError Add(
    WCharConstPtr string   // string to add
    SInt32 length = -1     // length of the string
);
[ public ]
SFCError Add(
    WChar character   // character to add
);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If insufficient memory: SFERR_NO_MEMORY

Description

This function adds the specified string to the end of this string.

If the pointer to the 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] 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] Tip
This function influences the content of this string. If you want to keep it unmodified, use the SFXWideString::Concat function.

Reference

SFXWideString::Concat | SFXWideString::Sub | SFXWideString::Mul | SFXWideString::operator<< | operator+ | SFXWideString::operator+=


SFXWideString::AsLower
Get this string converted to lower case.
[ public, const ]
SFXWideString AsLower(Void);

Return value

This string converted to lower case

Description

This function gets this string converted to lower case.

[Note] Note
This string will not be modified after this function is executed.

Reference

SFXWideString::AsUpper | SFXWideString::ToLower


SFXWideString::AsSInt32
Convert this string into the integer of the SInt32 type.
[ public, const ]
SInt32 AsSInt32(
    SInt32 substitute = 0   // the value when the conversion is failed
);

Return value

Integer of the SInt32 type converted from this string

Description

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] 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.

Reference

SFXWideString::AsUInt32


SFXWideString::AsUInt32
Convert this string into the integer of the UInt32 type.
[ public, const ]
UInt32 AsUInt32(
    UInt32 substitute = 0   // the value when the conversion is failed
);

Return value

Integer of the UInt32 type converted from this string

Description

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] 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.

Reference

SFXWideString::AsSInt32


SFXWideString::AsUpper
Get this string converted to upper case.
[ public, const ]
SFXWideString AsUpper(Void);

Return value

This string converted to upper case

Description

This function gets this string converted to upper case.

[Note] Note
This string will not be modified after this function is executed.

Reference

SFXWideString::AsLower | SFXWideString::ToUpper


SFXWideString::Attach
Attach the specified string to this string object.
[ public ]
SFCError Attach(
    SFXWideStringPtr string   // SFXWideString string
);
[ public ]
SFCError Attach(
    WCharPtr string      // WChar string
    SInt32 length = -1   // length of the string
);
[ public ]
SFCError Attach(
    SFXBufferPtr buffer   // SFXBuffer buffer
);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If the argument is null: SFERR_INVALID_PARAM

Description

This function attaches the specified string to this string object. After this function is executed, the specified string can be handled as the SFXWideString object.

This function is more efficient than the SFXWideString::Set function, since the string is not copied and the problem on insufficient memory or performance deterioration can be avoided.

[Note] Note
When this string object is released, the specified string will be released automatically together with this string object.

Example

SFXWideString string;
WCharPtr char_ptr;

// allocate the 10240-byte string area to char_ptr
char_ptr = static_cast<WCharPtr>(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

Reference

SFXWideString::Detach


SFXWideString::AttachSFXBuffer
[DEPRECATED]Attach the specified buffer to this string object.
[ public ]
SFCError AttachSFXBuffer(
    SFXBufferPtr buffer   // buffer
);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If the argument is null: SFERR_INVALID_PARAM

Description

[Caution] Caution
Since this function is deprecated, use the SFXWideString::Attach function.

Reference

SFXWideString::Attach | SFXWideString::Detach | SFXWideString::DetachSFXBuffer


SFXWideString::Clear
Clear this string.
[ public ]
Void Clear(Void);

Description

This function clears this string.

[Note] Note
The memory area allocated to this string before this function is executed will be released.

SFXWideString::Compare
Compare this string with the specified string in dictionary order.
[ public, const ]
SInt32 Compare(
    SFXWideStringConstRef string   // string to cpmpare with
    Bool sensitive = true          // case-sensitive or not
);
[ public, const ]
SInt32 Compare(
    WCharConstPtr string    // string to cpmpare with
    Bool sensitive = true   // case-sensitive or not
);

Return value

  • If this string is less than the specified string : Minus value
  • If this string equals the specified string: 0
  • If this string is greater than the specified string : Positive value

Description

This function compares this string with the specified string in dictionary order.

[Tip] Tip
Case sensitive comparison can be specified in the sensitive argument.

Reference

SFXWideString::Equals | operator== | operator!=


SFXWideString::Concat
Get the string obtained by concatenating this string and the specified string.
[ public, const ]
SFXWideString Concat(
    SFXWideStringConstRef string   // string to concatenate
);
[ public, const ]
SFXWideString Concat(
    WCharConstPtr string   // string to concatenate
    SInt32 length = -1     // length of the string
);
[ public, const ]
SFXWideString Concat(
    WChar character   // character to concatenate
);

Return value

String obtained by concatenating this string and the specified string.

Description

This function gets the string obtained by concatenating this string and the specified string.

If the pointer to the 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] 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] Tip
Different from the SFXWideString::Add function, this string will not be modified after this function is executed.

Reference

SFXWideString::Add | operator+ | SFXWideString::operator+=


SFXWideString::Copy
Overwrite the specified substring of this string with the specified string.
[ public ]
SFCError Copy(
    SInt32 index                   // starting position to overwrite
    SFXWideStringConstRef string   // string to overwrite with
);
[ public ]
SFCError Copy(
    SInt32 index           // starting position to overwrite
    WCharConstPtr string   // string to overwrite with
    SInt32 length = -1     // length of the string
);

Return value

  • If succeeds: SFERR_NO_ERROR
  • 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

Description

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 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] 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".


SFXWideString::Detach
Detach the string area from this string object.
[ public ]
SFCError Detach(
    SFXWideStringPtr string   // SFXWideString string to be detached
);
[ public ]
WCharPtr Detach(
    SInt32Ptr length = null   // the pointer to the length of the WChar string to be detached
);
[ public ]
SFCError Detach(
    SFXBufferPtr buffer   // SFXBuffer string to be detached
);

Return value

Return the string which this string object has in case it is detached to the WChar string. Otherwise, return the SFCError object.

Description

This function is more efficient than the SFXWideString::GetChar function, since the string area is not copied and the problem on insufficient memory or performance deterioration can be avoided.

Example

SFXWideString string;
WCharPtr 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);

Reference

SFXWideString::Attach


SFXWideString::DetachSFXBuffer
[DEPRECATED]Detach the string area from this string object.
[ public ]
SFCError DetachSFXBuffer(
    SFXBufferPtr buffer   // pointer to the buffer to be detached
);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If the argument is null: SFERR_INVALID_PARAM

Description

[Caution] Caution
Since this function is deprecated, use the SFXWideString::Detach function.

Reference

SFXWideString::Attach | SFXWideString::AttachSFXBuffer | SFXWideString::Detach


SFXWideString::EmptyInstance
Get the empty string.
[ public, static ]
SFXWideStringConstRef EmptyInstance(Void);

Return value

Empty string

Description

This function gets the empty string.

[Tip] Tip
This function will used to return the reference to the empty string as the return value of a function.

SFXWideString::EndsWith
Check whether the string ends with the specified string or not.
[ public, const ]
Bool EndsWith(
    SFXWideStringConstRef string   // string to check with
    Bool sensitive = true          // case-sensitive or not
);
[ public, const ]
Bool EndsWith(
    WCharConstPtr string    // string to check with
    Bool sensitive = true   // case-sensitive or not
);
[ public, const ]
Bool EndsWith(
    WChar character         // string to check with
    Bool sensitive = true   // case-sensitive or not
);

Return value

  • If ends with the specified string: true
  • Otherwise: false

Description

This function checks whether or not this string ends with the specified string.

[Tip] Tip
Case sensitive comparison can be specified in the sensitive argument.

Reference

SFXWideString::StartsWith


SFXWideString::Equals
Check whether or not this string equals the specified string.
[ public, const ]
Bool Equals(
    SFXWideStringConstRef string   // string to compare with
    Bool sensitive = true          // case-sensitive or not
);
[ public, const ]
Bool Equals(
    WCharConstPtr string    // string to compare with
    Bool sensitive = true   // case-sensitive or not
);

Return value

  • If this string equals the specified string: true
  • Otherwise: false

Description

This function checks whether or not this string equals the specified string.

[Tip] Tip
Case sensitive comparison can be specified in the sensitive argument.

Reference

SFXWideString::Compare | operator== | operator!=


SFXWideString::Fill
Fill this string with specified character.
[ public ]
Void Fill(
    WChar character   // character
);

Description

This function fills this string with the specified character.


SFXWideString::FirstIndexOf
Get the first index of this string to match the specified value, searching from the beginning.
[ public, const ]
SInt32 FirstIndexOf(
    SFXWideStringConstRef string    // string to match
    SInt32 index = SINT32_MINIMUM   // beginning index to search from
    Bool sensitive = true           // case-sensitive or not
);
[ public, const ]
SInt32 FirstIndexOf(
    WCharConstPtr string            // string to match
    SInt32 index = SINT32_MINIMUM   // beginning index to search from
    Bool sensitive = true           // case-sensitive or not
);
[ public, const ]
SInt32 FirstIndexOf(
    WChar character                 // character to match
    SInt32 index = SINT32_MINIMUM   // beginning index to search from
    Bool sensitive = true           // case-sensitive or not
);

Return value

  • If succeeds: The first index where found.
  • If failed: -1

Description

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] Tip
Case sensitive comparison can be specified in the sensitive argument.

Reference

SFXWideString::LastIndexOf


SFXWideString::Format
Create a string from the specified data by using the specified format.
[ public, static ]
SFXWideString Format(
    va_ref< SFXWideStringConst > format   // string that represents a format
    ...                                   // data
);
[ public, static ]
SFXWideString Format(
    va_ref< SFXWideStringConst > format   // string that represents a format
    ...                                   // data
);
[ public, static ]
SFXWideString Format(
    WCharConstPtr format   // string that represents a format
    ...                    // data
);
[ public, static ]
SFXWideString Format(
    WCharConstPtr format   // string that represents a format
    ...                    // data
);

Description

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] Note
For more details on the format, see BREW API SPRINTF.

Example

SIntN year = 2003;
SIntN month = 8;
SFXWideString str = SFXWideString::Format("%d Year %d Month ", year, month);

Reference

BREW API SPRINTF


SFXWideString::FormatV
Create a string from the variable-length argument by using the specified format.
[ public, static ]
SFXWideString FormatV(
    SFXWideStringConstRef format   // string that represents a format
    va_list argument               // variable-length argument
);
[ public, static ]
SFXWideString FormatV(
    SFXWideStringConstRef format   // string that represents a format
    va_list argument               // variable-length argument
);
[ public, static ]
SFXWideString FormatV(
    WCharConstPtr format   // string that represents a format
    va_list argument       // variable-length argument
);
[ public, static ]
SFXWideString FormatV(
    WCharConstPtr format   // string that represents a format
    va_list argument       // variable-length argument
);

Description

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] Note
For more details on the format, see BREW API SPRINTF.

Example

SFXWideString MyClass::variableArgument(SInt32 arg_num , ...) 
{
    va_list argument;

	va_start(argument, arg_num);
    
	SFXWideString str = SFXWideString::FormatV("%d Year %d Month %d Day %d Time %d Minute %d Second, It is %s today.", argument);
    
	va_end(argument);
   
	return str;

}

SFXWideString 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."

Reference

BREW API VSNPRINTF | BREW API SPRINTF


SFXWideString::GetBuffer
Get the pointer to the internal buffer of this string.
[ public ]
WCharPtr GetBuffer(Void);
[ public, const ]
WCharConstPtr GetBuffer(Void);

Return value

Pointer to the internal buffer of this string.

Description

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] Caution

You should not access the position over the length returned obtained by the SFXWideString::GetLength function from the position that the pointer to the internal buffer of this string.

[Note] Difference between the GetBuffer function and the GetCString function

When this string is empty, the SFXWideString::GetCString function will return the pointer to "\0", on the other hand, the SFXWideString::GetBuffer function will return null.

Since the pointer returned by the SFXWideString::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 SFXWideString::GetBuffer function.

Reference

SFXWideString::GetCString | SFXWideString::GetLength


SFXWideString::GetCString
Get the const pointer to the internal buffer of this string.
[ public, const ]
WCharConstPtr GetCString(Void);

Return value

Pointer of the WCharConstPtr type to the internal buffer of this string

Description

This function gets the pointer of the WCharConstPtr 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.

[Note] Difference between the GetBuffer function and the GetCString function

When this string is empty, the SFXWideString::GetCString function will return the pointer to "\0", on the other hand, the SFXWideString::GetBuffer function will return null.

Since the pointer returned by the SFXWideString::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 SFXWideString::GetBuffer function.

Reference

SFXWideString::GetBuffer


SFXWideString::GetChar
Get the character at the specified index of this string.
[ public, const ]
WChar GetChar(
    SInt32 index   // index to get the character
);

Return value

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.

Description

This function gets the character at the specified index of this string.

[Caution] Caution

If this string is empty or the specified index is out of range of this string , null('\0') will be returned.

Reference

SFXWideString::GetBuffer | SFXWideString::SetChar


SFXWideString::GetCluster
Get the cluster size of the internal buffer memory of this string. [in bytes]
[ public, const ]
UInt16 GetCluster(Void);

Return value

Cluster size of the internal buffer memory of this string. [in bytes]

Description

This function gets cluster size of the internal buffer memory of this string. [in bytes]

Reference

SFXWideString::SetCluster


SFXWideString::GetLength
Get the length(number of the characters) of this string.
[ public, const ]
SInt32 GetLength(Void);

Return value

Length(number of the characters) of this string.

Description

This function gets the length(number of the characters) of this string.

[Note] Note

If this string includes "\0", "\0" will be counted.

Example

SFXWideString str("abc\0abc", 7);
int i;
i = str.GetLengthCString(); // i = 3
i = str.GetLength();        // i = 7

Reference

SFXWideString::GetLengthCString | SFXWideString::SetLength


SFXWideString::GetLengthCString
Get the length(number of the characters) until the first "\0" character of this string.
[ public, const ]
SInt32 GetLengthCString(Void);

Return value

Length(number of the characters) until the first "\0" character of this string.

Description

This function gets the length(number of the characters) until the first "\0" character of this string.

[Note] Note

The first "\0" character will not be counted.

Example

SFXWideString str("abc\0abc", 7);
int i;
i = str.GetLengthCString(); // i = 3
i = str.GetLength();        // i = 7

Reference

SFXWideString::GetLength


SFXWideString::GetThreshold
Get the minimum size of the internal buffer memory of this string. [in bytes]
[ public, const ]
UInt16 GetThreshold(Void);

Return value

Minimum size of the internal buffer memory of this string. [in bytes]

Description

This function gets the minimum size of the internal buffer memory of this string. [in bytes]

Reference

SFXWideString::SetThreshold


SFXWideString::Insert
Get the string obtained by inserting the specified string or character at the specified index of this string.
[ public, const ]
SFXWideString Insert(
    SInt32 index                   // index to insert
    SFXWideStringConstRef string   // string to insert
);
[ public, const ]
SFXWideString Insert(
    SInt32 index           // index to insert
    WCharConstPtr string   // string to insert
    SInt32 length = -1     // lengh of string to insert
);
[ public, const ]
SFXWideString Insert(
    SInt32 index      // index to insert
    WChar character   // character to insert
);

Return value

String obtained by inserting the specified string or character at the specified index of this string.

Description

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] Caution

The content of this string will not be modified by this operation.


SFXWideString::IsAlpha
Check whether or not all the characters of this string are alphabetic.
[ public, const ]
Bool IsAlpha(Void);

Return value

  • If all the characters of this string are alphabetic, or empty: true
  • Otherwise: false

Description

This function checks whether or not all the characters of this string are alphabetic.

[Caution] Caution

If this string is empty, true will be returned.

Reference

SFXAscii::IsAlpha


SFXWideString::IsAlphaDigit
Check whether or not all the characters of this string are alphanumeric.
[ public, const ]
Bool IsAlphaDigit(Void);

Return value

  • If all the characters of this string are alphanumeric, or empty: true
  • Otherwise: false

Description

This function checks whether or not all the characters of this string are alphanumeric.

[Caution] Caution

If this string is empty, true will be returned.

Reference

SFXAscii::IsAlphaDigit


SFXWideString::IsAscii
Check whether or not all the characters of this string are ASCII.
[ public, const ]
Bool IsAscii(Void);

Return value

  • If all the characters of this string are ASCII, or empty: true
  • Otherwise: false

Description

This function checks whether or not all the characters of this string are ASCII.

[Note] ASCII character

The code of the ASCII character is greater than or equals 0x00 and less than or equals 0x7F.

[Caution] Caution

If this string is empty, true will be returned.

Reference

SFXAscii::IsAscii


SFXWideString::IsControl
Check whether or not all the characters of this string are the control characters.
[ public, const ]
Bool IsControl(Void);

Return value

  • If all the characters of this string are the control characters, or empty: true
  • Otherwise: false

Description

This function checks whether or not all the characters of this string are the control characters.

[Note] Control character

The code of the control character is less than 0x20, or equals 0x7F.

[Caution] Caution

If this string is empty, true will be returned.

Reference

SFXAscii::IsControl


SFXWideString::IsDigit
Check whether or not all the characters of this string are digit.
[ public, const ]
Bool IsDigit(Void);

Return value

  • If all the characters of this string are digit, or empty: true
  • Otherwise: false

Description

This function checks whether or not all the characters of this string are digit.

[Caution] Caution

If this string is empty, true will be returned.

Reference

SFXAscii::IsDigit


SFXWideString::IsEmpty
Check whether or not the length of this string is 0(this string is empty).
[ public, const ]
Bool IsEmpty(Void);

Return value

  • If the length of this string is 0(this string is empty): true
  • Otherwise: false

Description

This function checks whether or not the length of this string is 0(this string is empty).

Example

SFXWideString str("\0abc", 4);
Bool b;
b = str.IsEmptyCString(); // b = true
b = str.IsEmpty();        // b = false

Reference

SFXWideString::IsEmptyCString | SFXWideString::GetLength


SFXWideString::IsEmptyCString
Check whether or not the first character of this string is null('\0').
[ public, const ]
Bool IsEmptyCString(Void);

Return value

  • If the first character is null('\0'): true
  • Otherwise: false

Description

This function checks whether or not the first character of this string is null('\0').

Example

SFXWideString str("\0abc", 4);
Bool b;
b = str.IsEmptyCString(); // b = true
b = str.IsEmpty();        // b = false

Reference

SFXWideString::IsEmpty | SFXWideString::GetLength


SFXWideString::IsGraph
Check whether or not all the characters of this string are graphic.
[ public, const ]
Bool IsGraph(Void);

Return value

  • If all the characters of this string are graphic, or empty: true
  • Otherwise: false

Description

This function checks whether or not all the characters of this string are graphic.

[Note] 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] Caution

If this string is empty, true will be returned.

Reference

SFXAscii::IsGraph


SFXWideString::IsHexDigit
Check whether or not all the characters of this string are Hex digit.
[ public, const ]
Bool IsHexDigit(Void);

Return value

  • If all the characters of this string are Hex digit, or empty: true
  • Otherwise: false

Description

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] Caution

If this string is empty, true will be returned.

Reference

SFXAscii::IsHexDigit


SFXWideString::IsLower
Check whether or not all the characters of this string are lower-case.
[ public, const ]
Bool IsLower(Void);

Return value

  • If all the characters of this string are lower-case, or empty: true
  • Otherwise: false

Description

This function checks whether or not all the characters of this string are lower-case.

[Caution] Caution

If this string is empty, true will be returned.

Reference

SFXAscii::IsLower


SFXWideString::Isnull
Check whether or not all the characters of this string are null('\0').
[ public, const ]
Bool Isnull(Void);

Return value

  • If all the characters of this string are null('\0'), or empty: true
  • Otherwise: false

Description

This function checks whether or not all the characters of this string are null('\0').

[Caution] Caution

If this string is empty, true will be returned.

Reference

SFXAscii::IsNull


SFXWideString::IsPrint
Check whether or not all the characters of this string are printable.
[ public, const ]
Bool IsPrint(Void);

Return value

  • If all the characters of this string are printable, or empty: true
  • Otherwise: false

Description

This function checks whether or not all the characters of this string are printable.

[Note] 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] Caution

If this string is empty, true will be returned.

Reference

SFXAscii::IsPrint


SFXWideString::IsPunct
Check whether or not all the characters of this string are not space nor alphanumeric but printable.
[ public, const ]
Bool IsPunct(Void);

Return value

  • If all the characters of this string are not space nor alphanumeric but printable, or empty: true
  • Otherwise: false

Description

This function checks whether or not all the characters of this string are not space nor alphanumeric but printable.

[Caution] Caution

If this string is empty, true will be returned.

Reference

SFXAscii::IsPunct


SFXWideString::IsSpace
Check whether or not all the characters of this string are space.
[ public, const ]
Bool IsSpace(Void);

Return value

  • If all the characters of this string are space, or empty: true
  • Otherwise: false

Description

This function checks whether or not all the characters of this string are space.

[Note] Space character

The code of the space character including tab, line-feed, and carriage return is from 0x09 to 0x0D or 0x20.

[Caution] Caution

If this string is empty, true will be returned.

Reference

SFXAscii::IsSpace


SFXWideString::IsUpper
Check whether or not all the characters of this string are upper-case.
[ public, const ]
Bool IsUpper(Void);

Return value

  • If all the characters of this string are upper-case, or empty: true
  • Otherwise: false

Description

This function checks whether or not all the characters of this string are upper-case.

[Caution] Caution

If this string is empty, true will be returned.

Reference

SFXAscii::IsUpper


SFXWideString::LastIndexOf
Get the last index of this string to match the specified value, searching from the end.
[ public, const ]
SInt32 LastIndexOf(
    SFXWideStringConstRef string    // string to match
    SInt32 index = SINT32_MAXIMUM   // beginning index to search from
    Bool sensitive = true           // case-sensitive or not
);
[ public, const ]
SInt32 LastIndexOf(
    WCharConstPtr string            // string to match
    SInt32 index = SINT32_MAXIMUM   // beginning index to search from
    Bool sensitive = true           // case-sensitive or not
);
[ public, const ]
SInt32 LastIndexOf(
    WChar character                 // character to match
    SInt32 index = SINT32_MAXIMUM   // beginning index to search from
    Bool sensitive = true           // case-sensitive or not
);

Return value

  • If succeeds: The last index where found.
  • If failed: -1

Description

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] Tip
Case sensitive comparison can be specified in the sensitive argument.

Reference

SFXWideString::FirstIndexOf


SFXWideString::Mul
Make this string repeated by the specified times.
[ public ]
SFCError Mul(
    SInt32 repeat   // times to repeat
);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If insufficient memory: SFERR_NO_MEMOERY

Description

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.

Example

SFXWideString str("abc");
str.Mul(3); // str = "abcabcabc"

Reference

SFXWideString::Add | SFXWideString::Sub | operator* | SFXWideString::operator*=


SFXWideString::Remove
Get the string obtained by removing characters in the specified range from this string.
[ public, const ]
SFXWideString Remove(
    SInt32 begin   // beginning index(this index is included)
    SInt32 end     // ending index(this index is not included)
);

Return value

String obtained by removing characters in the specified range from this string.

Description

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] Note
This function will not change the content of this string.

Reference

SFXWideString::Insert


SFXWideString::Replace
Get the string obtained by replacing the specified substring in this string with the specified string.
[ public, const ]
SFXWideString Replace(
    SFXWideStringConstRef fstring   // string to be replaced
    SFXWideStringConstRef tstring   // string to replace with
    Bool sensitive = true           // case-sensitive or not
);
[ public, const ]
SFXWideString Replace(
    SFXWideStringConstRef fstring   // string to be replaced
    WCharConstPtr tstring           // string to replace with
    Bool sensitive = true           // case-sensitive or not
);
[ public, const ]
SFXWideString Replace(
    SFXWideStringConstRef fstring   // string to be replaced
    WCharConstPtr tstring           // string to replace with
    SInt32 tlength                  // length of string to replace with
    Bool sensitive = true           // case-sensitive or not
);
[ public, const ]
SFXWideString Replace(
    WCharConstPtr fstring           // string to be replaced
    SFXWideStringConstRef tstring   // string to replace with
    Bool sensitive = true           // case-sensitive or not
);
[ public, const ]
SFXWideString Replace(
    WCharConstPtr fstring           // string to be replaced
    SInt32 flength                  // length of string to be replaced
    SFXWideStringConstRef tstring   // string to replace with
    Bool sensitive = true           // case-sensitive or not
);
[ public, const ]
SFXWideString Replace(
    WCharConstPtr fstring   // string to be replaced
    WCharConstPtr tstring   // string to replace with
    Bool sensitive = true   // case-sensitive or not
);
[ public, const ]
SFXWideString Replace(
    WCharConstPtr fstring   // string to be replaced
    SInt32 flength          // length of string to be replaced
    WCharConstPtr tstring   // string to replace with
    SInt32 tlength          // length of string to replace with
    Bool sensitive = true   // case-sensitive or not
);
[ public, const ]
SFXWideString Replace(
    SFXWideStringConstRef fstring   // string to be replaced
    WChar tcharacter                // character to replace with
    Bool sensitive = true           // case-sensitive or not
);
[ public, const ]
SFXWideString Replace(
    WChar fcharacter                // character to be replaced
    SFXWideStringConstRef tstring   // string to replace with
    Bool sensitive = true           // case-sensitive or not
);
[ public, const ]
SFXWideString Replace(
    WChar fcharacter        // character to be replaced
    WChar tcharacter        // character to replace with
    Bool sensitive = true   // case-sensitive or not
);
[ public, const ]
SFXWideString Replace(
    WCharConstPtr fstring   // string to be replaced
    WChar tcharacter        // character to replace with
    Bool sensitive = true   // case-sensitive or not
);
[ public, const ]
SFXWideString Replace(
    WCharConstPtr fstring   // string to be replaced
    SInt32 flength          // length of string to be replaced
    WChar tcharacter        // character to replace with
    Bool sensitive = true   // case-sensitive or not
);
[ public, const ]
SFXWideString Replace(
    WChar fcharacter        // character to be replaced
    WCharConstPtr tstring   // string to replace with
    Bool sensitive = true   // case-sensitive or not
);
[ public, const ]
SFXWideString Replace(
    WChar fcharacter        // character to be replaced
    WCharConstPtr tstring   // string to replace with
    SInt32 tlength          // length of string to replace with
    Bool sensitive = true   // case-sensitive or not
);

Return value

String obtained by replacing the specified substring in this string with the specified string.

Description

This function gets the string obtained by replacing the specified substring in this string with the specified string.

[Note] 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] Tip
Case sensitive comparison can be specified in the sensitive argument.
[Note] Note
This function will not change the content of this string.

SFXWideString::Set
Set this string to the specified string, character, or buffer.
[ public ]
SFCError Set(
    SFXWideStringConstRef string   // source string of WChar type
);
[ public ]
SFCError Set(
    SFXWideStringConstRef string   // source string of WChar type
);
[ public ]
SFCError Set(
    WCharConstPtr string   // WChar pointer to the source string
    SInt32 length = -1     // length of the string
);
[ public ]
SFCError Set(
    WCharConstPtr string   // WChar pointer to the source string
    SInt32 length = -1     // length of the string
);
[ public ]
SFCError Set(
    WChar character   // WChar character of source string
);
[ public ]
SFCError Set(
    SFXBufferConstRef buffer   // buffer of source string
);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If insufficient memory: SFERR_NO_MEMORY

Description

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] 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] Note
If this function fails due to insufficient memory, the content of this string will not be modified.

Reference

SFXWideString::SFXWideString | SFXWideString::operator=


SFXWideString::SetChar
Set the specified character at the specified index of this string.
[ public ]
SFCError SetChar(
    SInt32 index      // index where a character is set
    WChar character   // character to set
);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If the specified index is out of range of this string: SFERR_INVALID_PARAM

Description

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] 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.

Reference

SFXWideString::GetBuffer | SFXWideString::GetChar


SFXWideString::SetCluster
Set the cluster size of the internal buffer memory of this string. [in bytes]
[ public ]
Void SetCluster(
    UInt16 size   // cluster size to set
);

Description

This function sets the minimum unit to allocate the internal buffer memory(SFXClusterHeap) of this string to the specified value. [in bytes]

Default: SFXWideString::DEFAULT_CLUSTER bytes

For the value of SFXWideString::DEFAULT_CLUSTER, see SFXWideString::DefaultEnum.

Reference

SFXWideString::GetCluster | SFXWideString::DefaultEnum | SFXClusterHeap::SetCluster | SFXClusterHeap


SFXWideString::SetLength
Set the length of this string.
[ public ]
SFCError SetLength(
    SInt32 length   // length to set
);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If insufficient memory: SFERR_NO_MEMORY

Description

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.

Reference

SFXWideString::GetLength | SFXWideString::GetLengthCString


SFXWideString::SetThreshold
Set the minimum size of the internal buffer memory of this string. [in bytes]
[ public ]
Void SetThreshold(
    UInt16 size   // minimum value to set
);

Description

This function sets the minimum memory of the internal buffer memory(SFXClusterHeap) of this string to the specified value. [in bytes]

Default: SFXWideString::DEFAULT_THRESHOLD bytes

For the value of SFXWideString::DEFAULT_THRESHOLD, see SFXWideString::DefaultEnum.

Reference

SFXWideString::GetThreshold | SFXWideString::DefaultEnum | SFXClusterHeap::SetThreshold | SFXClusterHeap


SFXWideString::StartsWith
Check whether or not this string starts with the specified string.
[ public, const ]
Bool StartsWith(
    SFXWideStringConstRef string   // string to check with
    Bool sensitive = true          // case-sensitive or not
);
[ public, const ]
Bool StartsWith(
    WCharConstPtr string    // string to check with
    Bool sensitive = true   // case-sensitive or not
);
[ public, const ]
Bool StartsWith(
    WChar character         // character to check with
    Bool sensitive = true   // case-sensitive or not
);

Return value

  • If starts with the specified string: true
  • Otherwise: false

Description

This function checks whether or not this string starts with the specified string.

Reference

SFXWideString::EndsWith


SFXWideString::Sub
Delete the specified string at the end of this string.
[ public ]
SFCError Sub(
    SFXWideStringConstRef string   // string to delete
);
[ public ]
SFCError Sub(
    WCharConstPtr string   // string to delete
    SInt32 length = -1     // length of the string
);
[ public ]
SFCError Sub(
    WChar character   // character to delete
);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If insufficient memory: SFERR_NO_MEMORY

Description

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 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] 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] Tip
This function influences the content of this string. If you want to keep it unmodified, use the operator- operator.

Reference

SFXWideString::operator-= | operator- | operator+


SFXWideString::Substring
Get the sub-string in the specified range of this string.
[ public, const ]
SFXWideString Substring(
    SInt32 begin   // beginning index(this index is included)
    SInt32 end     // ending index(this index is not included)
);

Return value

Sub-string in the specified range of this string.

Description

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] Tip
This string will not be modified after this function is executed.

Example

SFXWideString str1("American");
SFXWideString str2 = str1.Substring(2, 6);  // str2 = "eric"

SFXWideString::ToLower
Convert this string to lower-case.
[ public ]
Void ToLower(Void);

Description

This function converts this string to lower-case.

[Note] Note

This function influences the content of this string. If you want to keep it unmodified, use the SFXWideString::AsLower function.

Reference

SFXWideString::ToUpper | SFXWideString::AsLower


SFXWideString::ToUpper
Convert this string to upper-case.
[ public ]
Void ToUpper(Void);

Description

This function converts this string to upper-case.

[Note] Note

This function influences the content of this string. If you want to keep it unmodified, use the SFXWideString::AsUpper function.

Reference

SFXWideString::ToLower | SFXWideString::AsUpper


SFXWideString::Trim
Get the string obtained by trimming the blank characters or the specified string/character from the head and tail of this string.
[ public, const ]
SFXWideString Trim(
    SFXWideStringConstRef string   // string to trim
    Bool sensitive = true          // case-sensitive or not
);
[ public, const ]
SFXWideString Trim(
    WCharConstPtr string    // string to trim
    Bool sensitive = true   // case-sensitive or not
);
[ public, const ]
SFXWideString Trim(
    WChar character         // string to trim
    Bool sensitive = true   // case-sensitive or not
);
[ public, const ]
SFXWideString Trim(Void);

Return value

String obtained by trimming the blank characters or the specified string/character from the head and tail of this string.

Description

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] Tip
Case sensitive comparison can be specified in the sensitive argument.
[Note] Note
This function will not change the content of this string.

Example

SFXWideString str1("\t delicious beef ");
SFXWideString str2 = str1.Trim();        // str2 = "delicious beef"
SFXWideString str3 = str2.Trim("adef");  // str3 = "licious b"

Reference

SFXWideString::TrimLeft | SFXWideString::TrimRight


SFXWideString::TrimLeft
Get the string obtained by trimming the blank characters or the specified string/character from the head of this string.
[ public, const ]
SFXWideString TrimLeft(
    SFXWideStringConstRef string   // string to trim
    Bool sensitive = true          // case-sensitive or not
);
[ public, const ]
SFXWideString TrimLeft(
    WCharConstPtr string    // string to trim
    Bool sensitive = true   // case-sensitive or not
);
[ public, const ]
SFXWideString TrimLeft(
    WChar character         // string to trim
    Bool sensitive = true   // case-sensitive or not
);
[ public, const ]
SFXWideString TrimLeft(Void);

Return value

String obtained by trimming the blank characters or the specified string/character from the head of this string.

Description

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] Tip
Case sensitive comparison can be specified in the sensitive argument.
[Note] Note
This function will not change the content of this string.

Example

SFXWideString str1("\t delicious beef ");
SFXWideString str2 = str1.TrimLeft();        // str2 = "delicious beef "
SFXWideString str3 = str2.TrimLeft("adef");  // str3 = "licious beef "

Reference

SFXWideString::Trim | SFXWideString::TrimRight


SFXWideString::TrimRight
Get the string obtained by trimming the blank characters or the specified string/character from the tail of this string.
[ public, const ]
SFXWideString TrimRight(
    SFXWideStringConstRef string   // string to trim
    Bool sensitive = true          // case-sensitive or not
);
[ public, const ]
SFXWideString TrimRight(
    WCharConstPtr string    // string to trim
    Bool sensitive = true   // case-sensitive or not
);
[ public, const ]
SFXWideString TrimRight(
    WChar character         // string to trim
    Bool sensitive = true   // case-sensitive or not
);
[ public, const ]
SFXWideString TrimRight(Void);

Return value

String obtained by trimming the blank characters or the specified string/character from the tail of this string.

Description

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] Tip
Case sensitive comparison can be specified in the sensitive argument.
[Note] Note
This function will not change the content of this string.

Example

SFXWideString str1("\t delicious beef ");
SFXWideString str2 = str1.TrimRight();        // str2 = "\t delicious beef"
SFXWideString str3 = str2.TrimRight("adef");  // str3 = "\t delicious b"

Reference

SFXWideString::Trim | SFXWideString::TrimLeft


SFXWideString::Truncate
Get the string until the first null('\0') character of this string.
[ public, const ]
SFXWideString Truncate(Void);

Return value

String until the first null('\0') character of this string.

[Note] Note
This function will not change the content of this string.

Description

This function gets the string until the first null('\0') character of this string.

Example

SFXWideString str1("abc\0abc", 7);
SFXWideString str2 = str1.Truncate(); // str2 = "abc"

SFXWideString::operator=
Assign the right-hand string to the left-hand string.
[ public ]
SFXWideStringRef operator=(
    SFXWideStringConstRef string   // source string of WChar type
);
[ public ]
SFXWideStringRef operator=(
    SFXWideStringConstRef string   // source string of WChar type
);
[ public ]
SFXWideStringRef operator=(
    ACharConstPtr string   // AChar pointer of source string
);
[ public ]
SFXWideStringRef operator=(
    WCharConstPtr string   // WChar pointer of source string
);

Description

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] Tip
This operator influences the content of the left-hand string.

Reference

SFXWideString::Set | SFXWideString::SFXWideString


operator==
Check whether or not the left-hand string is the same with the right-hand string.
[ public, friend ]
Bool operator==(
    SFXWideStringConstRef left    // string to compare
    SFXWideStringConstRef right   // string to compare
);
[ public, friend ]
Bool operator==(
    SFXWideStringConstRef left    // string to compare
    SFXWideStringConstRef right   // string to compare
);
[ public, friend ]
Bool operator==(
    SFXWideStringConstRef left   // string to compare
    WCharConstPtr right          // string to compare
);
[ public, friend ]
Bool operator==(
    SFXWideStringConstRef left   // string to compare
    WCharConstPtr right          // string to compare
);
[ public, friend ]
Bool operator==(
    WCharConstPtr left            // string to compare
    SFXWideStringConstRef right   // string to compare
);
[ public, friend ]
Bool operator==(
    WCharConstPtr left            // string to compare
    SFXWideStringConstRef right   // string to compare
);

Return value

  • If the left-hand string is the same with the right-hand string: true
  • Otherwise: false

Description

This operator checks whether or not the left-hand string is the same with the right-hand string.

Reference

SFXWideString::Equals | operator!=


operator>=
Check whether or not the left-hand string is greater than or equals the right-hand string.
[ public, friend ]
Bool operator>=(
    SFXWideStringConstRef left    // string to compare
    SFXWideStringConstRef right   // string to compare
);
[ public, friend ]
Bool operator>=(
    SFXWideStringConstRef left    // string to compare
    SFXWideStringConstRef right   // string to compare
);
[ public, friend ]
Bool operator>=(
    SFXWideStringConstRef left   // string to compare
    WCharConstPtr right          // string to compare
);
[ public, friend ]
Bool operator>=(
    SFXWideStringConstRef left   // string to compare
    WCharConstPtr right          // string to compare
);
[ public, friend ]
Bool operator>=(
    WCharConstPtr left            // string to compare
    SFXWideStringConstRef right   // string to compare
);
[ public, friend ]
Bool operator>=(
    WCharConstPtr left            // string to compare
    SFXWideStringConstRef right   // string to compare
);

Return value

  • If the left-hand string is greater than or equals the right-hand string: true
  • Otherwise: false

Description

This operator checks whether or not the left-hand string is greater than or equals the right-hand string.

Reference

SFXWideString::Compare | operator> | operator< | operator<=


operator>
Check whether or not the left-hand string is greater than the right-hand string.
[ public, friend ]
Bool operator>(
    SFXWideStringConstRef left    // string to compare
    SFXWideStringConstRef right   // string to compare
);
[ public, friend ]
Bool operator>(
    SFXWideStringConstRef left    // string to compare
    SFXWideStringConstRef right   // string to compare
);
[ public, friend ]
Bool operator>(
    SFXWideStringConstRef left   // string to compare
    WCharConstPtr right          // string to compare
);
[ public, friend ]
Bool operator>(
    SFXWideStringConstRef left   // string to compare
    WCharConstPtr right          // string to compare
);
[ public, friend ]
Bool operator>(
    WCharConstPtr left            // string to compare
    SFXWideStringConstRef right   // string to compare
);
[ public, friend ]
Bool operator>(
    WCharConstPtr left            // string to compare
    SFXWideStringConstRef right   // string to compare
);

Return value

  • If the left-hand string is greater than the right-hand string: true
  • Otherwise: false

Description

This operator checks whether or not the left-hand string is greater than the right-hand string.

Reference

SFXWideString::Compare | operator>= | operator< | operator<=


SFXWideString::operator[]
Get the character at the right-hand index of the left-hand string.
[ public ]
WCharRef operator[](
    SInt32 index   // index position of string to get
);
[ public, const ]
WCharConstRef operator[](
    SInt32 index   // index position of string to get
);

Description

This operator gets the character at the right-hand index of the left-hand string.

[Caution] 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.

Reference

SFXWideString::GetChar


SFXWideString::operator<<
Add the right-hand string to the end of the left-hand string.
[ public, friend ]
SFXWideStringRef operator<<(
    SFXWideStringRef left         // target string
    SFXWideStringConstRef right   // string to append
);
[ public, friend ]
SFXWideStringRef operator<<(
    SFXWideStringRef left         // target string
    SFXWideStringConstRef right   // string to append
);
[ public, friend ]
SFXWideStringRef operator<<(
    SFXWideStringRef left   // target string
    WCharConstPtr right     // string to append
);
[ public, friend ]
SFXWideStringRef operator<<(
    SFXWideStringRef left   // target string
    WCharConstPtr right     // string to append
);
[ public, friend ]
SFXWideStringRef operator<<(
    SFXWideStringRef left   // target string
    WChar right             // string to append
);

Description

This operator adds the right-hand string to the end of the left-hand string.

[Tip] Tip

This operator influences the content of the left-hand string.

This operator is very useful to concatenate multiple strings.

Example

SFXWideString str = "abc";
str << "def" << "ghi"; // str = "abcdefghi"

Reference

SFXWideString::Add | SFXWideString::operator+=


operator<=
Check whether or not the left-hand string is less than or equals the right-hand string.
[ public, friend ]
Bool operator<=(
    SFXWideStringConstRef left    // string to compare
    SFXWideStringConstRef right   // string to compare
);
[ public, friend ]
Bool operator<=(
    SFXWideStringConstRef left    // string to compare
    SFXWideStringConstRef right   // string to compare
);
[ public, friend ]
Bool operator<=(
    SFXWideStringConstRef left   // string to compare
    WCharConstPtr right          // string to compare
);
[ public, friend ]
Bool operator<=(
    SFXWideStringConstRef left   // string to compare
    WCharConstPtr right          // string to compare
);
[ public, friend ]
Bool operator<=(
    WCharConstPtr left            // string to compare
    SFXWideStringConstRef right   // string to compare
);
[ public, friend ]
Bool operator<=(
    WCharConstPtr left            // string to compare
    SFXWideStringConstRef right   // string to compare
);

Return value

  • If the left-hand string is less than or equals the right-hand string: true
  • Otherwise: false

Description

This operator checks whether or not the left-hand string is less than or equals the right-hand string.

Reference

SFXWideString::Compare | operator> | operator>= | operator<


operator<
Check whether or not the left-hand string is less than the right-hand string.
[ public, friend ]
Bool operator<(
    SFXWideStringConstRef left    // string to compare
    SFXWideStringConstRef right   // string to compare
);
[ public, friend ]
Bool operator<(
    SFXWideStringConstRef left    // string to compare
    SFXWideStringConstRef right   // string to compare
);
[ public, friend ]
Bool operator<(
    SFXWideStringConstRef left   // string to compare
    WCharConstPtr right          // string to compare
);
[ public, friend ]
Bool operator<(
    SFXWideStringConstRef left   // string to compare
    WCharConstPtr right          // string to compare
);
[ public, friend ]
Bool operator<(
    WCharConstPtr left            // string to compare
    SFXWideStringConstRef right   // string to compare
);
[ public, friend ]
Bool operator<(
    WCharConstPtr left            // string to compare
    SFXWideStringConstRef right   // string to compare
);

Return value

  • If the left-hand string is less than the right-hand string: true
  • Otherwise: false

Description

This operator checks whether or not the left-hand string is less than the right-hand string.

Reference

SFXWideString::Compare | operator> | operator>= | operator<=


SFXWideString::operator-=
Delete the right-hand string from the end of the left-hand string.
[ public ]
SFXWideStringRef operator-=(
    SFXWideStringConstRef string   // string to delete from the end
);
[ public ]
SFXWideStringRef operator-=(
    WCharConstPtr string   // string to delete from the end
);
[ public ]
SFXWideStringRef operator-=(
    WChar character   // character to delete from the end
);

Description

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] Tip
This operator influences the content of the left-hand string.

Reference

SFXWideString::Sub | operator-


operator-
Return the string obtained by deleting the right-hand string from the end of the left-hand string.
[ public, friend ]
SFXWideString operator-(
    SFXWideStringConstRef left    // target string
    SFXWideStringConstRef right   // string to delete from the end
);
[ public, friend ]
SFXWideString operator-(
    SFXWideStringConstRef left    // target string
    SFXWideStringConstRef right   // string to delete from the end
);
[ public, friend ]
SFXWideString operator-(
    SFXWideStringConstRef left   // target string
    WCharConstPtr right          // string to delete from the end
);
[ public, friend ]
SFXWideString operator-(
    SFXWideStringConstRef left   // target string
    WCharConstPtr right          // string to delete from the end
);
[ public, friend ]
SFXWideString operator-(
    WCharConstPtr left            // target string
    SFXWideStringConstRef right   // string to delete from the end
);
[ public, friend ]
SFXWideString operator-(
    WCharConstPtr left            // target string
    SFXWideStringConstRef right   // string to delete from the end
);
[ public, friend ]
SFXWideString operator-(
    SFXWideStringConstRef left   // target string
    WChar right                  // character to delete from the end
);
[ public, friend ]
SFXWideString operator-(
    WChar left                    // target Character
    SFXWideStringConstRef right   // string to delete from the end
);

Description

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.

Example

SFXWideString str1("Hello World");
SFXWideString str2(" World");
SFXWideString str3 = str1 - str2;   // str3 = "Hello"

Reference

SFXWideString::Sub SFXWideString::operator-=


SFXWideString::operator*=
Repeat the left-hand string by the right-hand times.
[ public ]
SFXWideStringRef operator*=(
    SInt32 repeat   // times to repeat
);

Description

This operator repeats the left-hand string by the right-hand times.

[Tip] Tip
This operator influences the content of the left-hand string.

Reference

SFXWideString::Mul | operator*


operator*
Return the string obtained by repeating the left-hand string by the right-hand times.
[ public, friend ]
SFXWideString operator*(
    SFXWideStringConstRef left   // string to repeat
    SInt32 right                 // times to repeat
);

Description

This operator returns the string obtained by repeating the left-hand string by the right-hand times.

Reference

SFXWideString::Mul | SFXWideString::operator*=


operator!=
Check whether or not the left-hand string is different from the right-hand string.
[ public, friend ]
Bool operator!=(
    SFXWideStringConstRef left    // string to compare
    SFXWideStringConstRef right   // string to compare
);
[ public, friend ]
Bool operator!=(
    SFXWideStringConstRef left    // string to compare
    SFXWideStringConstRef right   // string to compare
);
[ public, friend ]
Bool operator!=(
    SFXWideStringConstRef left   // string to compare
    WCharConstPtr right          // string to compare
);
[ public, friend ]
Bool operator!=(
    SFXWideStringConstRef left   // string to compare
    WCharConstPtr right          // string to compare
);
[ public, friend ]
Bool operator!=(
    WCharConstPtr left            // string to compare
    SFXWideStringConstRef right   // string to compare
);
[ public, friend ]
Bool operator!=(
    WCharConstPtr left            // string to compare
    SFXWideStringConstRef right   // string to compare
);

Return value

  • If the left-hand string is different from the right-hand string: true
  • Otherwise: false

Description

This operator checks whether or not the left-hand string is different from the right-hand string.

Reference

SFXWideString::Equals | operator==


SFXWideString::operator+=
Add the right-hand string to the end of the left-hand string.
[ public ]
SFXWideStringRef operator+=(
    SFXWideStringConstRef string   // string to add
);
[ public ]
SFXWideStringRef operator+=(
    WCharConstPtr string   // string to add
);
[ public ]
SFXWideStringRef operator+=(
    WChar character   // 追加する文字
);

Description

This operator adds the right-hand string to the end of the left-hand string.

[Tip] Tip
This operator influences the content of the left-hand string.

Reference

SFXWideString::Add | operator+ | SFXWideString::operator<<


operator+
Return the string obtained by adding the right-hand string to the end of the left-hand string.
[ public, friend ]
SFXWideString operator+(
    SFXWideStringConstRef left    // source string
    SFXWideStringConstRef right   // string to add
);
[ public, friend ]
SFXWideString operator+(
    SFXWideStringConstRef left    // source string
    SFXWideStringConstRef right   // string to add
);
[ public, friend ]
SFXWideString operator+(
    SFXWideStringConstRef left   // source string
    WCharConstPtr right          // string to add
);
[ public, friend ]
SFXWideString operator+(
    SFXWideStringConstRef left   // source string
    WCharConstPtr right          // string to add
);
[ public, friend ]
SFXWideString operator+(
    WCharConstPtr left            // source string
    SFXWideStringConstRef right   // string to add
);
[ public, friend ]
SFXWideString operator+(
    WCharConstPtr left            // source string
    SFXWideStringConstRef right   // string to add
);
[ public, friend ]
SFXWideString operator+(
    SFXWideStringConstRef left   // source string
    WChar right                  // character to add
);
[ public, friend ]
SFXWideString operator+(
    WChar left                    // source character
    SFXWideStringConstRef right   // character to add
);

Description

This operator returns the string obtained by adding the right-hand string to the end of the left-hand string.

Reference

SFXWideString::Add | SFXWideString::operator+=


SFXWideString::DefaultEnum
Constants that represent the default values for the minimum size and the cluster size of the internal buffer memory. [in bytes]
enum DefaultEnum {
    DEFAULT_THRESHOLD = 4 * sizeof(WChar),     // default minimum size of the internal buffer memory [in bytes]
    DEFAULT_CLUSTER   = 8 * sizeof(WChar)      // default cluster size to allocate the internal buffer memory [in bytes]
};

Description

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]

Reference

SFXWideString::SetCluster | SFXWideString::SetThreshold | SFXClusterHeap