CTR Pia  4.11.3
Game Communication Engine
nn::pia::common::String Class Reference

Class for representing strings. More...

+ Inheritance diagram for nn::pia::common::String:

Public Member Functions

 String ()
 Instantiates the object with default parameters (default constructor).
 
 String (const String &rhs)
 This is the copy constructor. More...
 
 String (const char *pStr)
 Instantiates the object built from a C string. More...
 
s32 Format (const char *pFormatString,...)
 Builds a string according to the format. More...
 
s32 FormatV (const char *pFormatString, va_list varg)
 Builds a string according to the format. More...
 
const char * GetCharArray () const
 Gets a pointer to the string buffer. More...
 
bool operator!= (const String &rhs) const
 This is an equality operator. It determines whether two String objects are not equal. More...
 
Stringoperator= (const String &rhs)
 This is the assignment operator. More...
 
bool operator== (const String &rhs) const
 This is an equality operator. It determines whether two String objects are equal. More...
 
u32 StrLen () const
 Calculates the length of a string. More...
 
virtual void Trace (u64 flag) const
 Prints information useful for debugging. More...
 

Detailed Description

Class for representing strings.

This class includes a 128-byte buffer used to store strings.


Revision History:
2012-04-19 Initial version.

Constructor & Destructor Documentation

nn::pia::common::String::String ( const String rhs)

This is the copy constructor.

Parameters
[in]rhsSpecifies the string to copy.
nn::pia::common::String::String ( const char *  pStr)

Instantiates the object built from a C string.

Parameters
[in]pStrSpecifies a pointer to a C string.

Member Function Documentation

s32 nn::pia::common::String::Format ( const char *  pFormatString,
  ... 
)

Builds a string according to the format.

Parameters
[in]pFormatStringSpecifies the format string.
[in]...Specifies variable arguments.
Returns
Returns the length of the string after writing it.
s32 nn::pia::common::String::FormatV ( const char *  pFormatString,
va_list  varg 
)

Builds a string according to the format.

Parameters
[in]pFormatStringSpecifies the format string.
[in]vargSpecifies a variable argument list.
Returns
Returns the length of the string after writing it.
const char* nn::pia::common::String::GetCharArray ( ) const
inline

Gets a pointer to the string buffer.

Returns
Specifies a pointer to the string buffer.
bool nn::pia::common::String::operator!= ( const String rhs) const
inline

This is an equality operator. It determines whether two String objects are not equal.

Parameters
[in]rhsSpecifies the string to compare.
Returns
Returns true if the objects are not equal, and false otherwise.
String& nn::pia::common::String::operator= ( const String rhs)

This is the assignment operator.

Parameters
[in]rhsSpecifies the string to assign.
Returns
Returns a reference to this instance.
bool nn::pia::common::String::operator== ( const String rhs) const

This is an equality operator. It determines whether two String objects are equal.

Parameters
[in]rhsSpecifies the string to compare.
Returns
Returns true if the objects are equal, and false otherwise.
u32 nn::pia::common::String::StrLen ( ) const

Calculates the length of a string.

Returns
Specifies the length of the string.
virtual void nn::pia::common::String::Trace ( u64  flag) const
virtual

Prints information useful for debugging.

Parameters
[in]flagSpecifies the bitwise OR of trace flags. For more information, see the TraceFlag type.