template<s32 L>
WStringTmp class
Base classes
-
template<s32 L>class sead::WFixedSafeString<L>
Constructors, destructors, conversion operators
- WStringTmp(const char16* format, ...)
- WStringTmp()
- __attribute__((always_inline)) BufferedSafeStringBase(char16 *buffer
- if(size<= 0)
Public functions
- auto operator[](s32 idx) const -> const char16&
- auto getBuffer() -> char16*
- auto getBufferSize() const -> s32
- auto copy(const SafeStringBase<char16>& src, s32 copyLength = -1) -> s32
- auto copyAt(s32 at, const SafeStringBase<char16>& src, s32 copyLength = -1) -> s32
- auto cutOffCopy(const SafeStringBase<char16>& src, s32 copyLength = -1) -> s32
- auto cutOffCopyAt(s32 at, const SafeStringBase<char16>& src, s32 copyLength = -1) -> s32
- auto copyAtWithTerminate(s32 at, const SafeStringBase<char16>& src, s32 copyLength = -1) -> s32
- auto format(const char16* format, ...) -> s32
- auto format(const char* formatStr, ...) -> s32
- auto format(const char16* formatStr, ...) -> s32
- auto format(const char* formatStr, ...) -> s32
- auto format(const char16* formatStr, ...) -> s32
- auto formatV(const char16* format, std::va_list args) -> s32
- auto formatV(const char* formatStr, va_list args) -> s32
- auto formatV(const char16* formatStr, va_list args) -> s32
- auto formatV(const char* formatStr, va_list args) -> s32
- auto formatV(const char16* formatStr, va_list args) -> s32
- auto appendWithFormat(const char16* formatStr, ...) -> s32
- auto appendWithFormat(const char* formatStr, ...) -> s32
- auto appendWithFormat(const char16* formatStr, ...) -> s32
- auto appendWithFormat(const char* format, ...) -> s32
- auto appendWithFormat(const char16* format, ...) -> s32
- auto appendWithFormatV(const char16* formatStr, std::va_list args) -> s32
- auto appendWithFormatV(const char* formatStr, va_list args) -> s32
- auto appendWithFormatV(const char16* formatStr, va_list args) -> s32
- auto appendWithFormatV(const char* format, std::va_list args) -> s32
- auto appendWithFormatV(const char16* format, std::va_list args) -> s32
- auto append(const SafeStringBase<char16>& str, s32 append_length = -1) -> s32
- Append append_length characters from str.
- auto append(char16 c) -> s32
- Append a character.
- auto append(char16 c, s32 n) -> s32
- Append a character n times.
- auto prepend(const SafeStringBase<char16>& str, s32 prepend_length = -1) -> s32
- auto chop(s32 num) -> s32
- auto chopMatchedChar(char16 c) -> s32
- auto chopMatchedChar(const char16* characters) -> s32
- auto chopUnprintableAsciiChar() -> s32
- auto rstrip(const char16* characters) -> s32
- auto rstripUnprintableAsciiChars() -> s32
- auto trim(s32 trim_length) -> s32
- auto trimMatchedString(const SafeStringBase<char16>& suffix) -> s32
- auto removeSuffix(const SafeStringBase<char16>& suffix) -> s32
- auto replaceChar(char16 old_char, char16 new_char) -> s32
- auto replaceCharList(const SafeStringBase<char16>& old_chars, const SafeStringBase<char16>& new_chars) -> s32
- auto setReplaceString(const SafeStringBase<char16>& target_str, const SafeStringBase<char16>& old_str, const SafeStringBase<char16>& new_str) -> s32
- auto replaceString(const SafeStringBase<char16>& old_str, const SafeStringBase<char16>& new_str) -> s32
- auto convertFromMultiByteString(const SafeStringBase<char>& str, s32 str_length) -> s32
- auto convertFromWideCharString(const SafeStringBase<char16>& str, s32 str_length) -> s32
- void clear()
Public variables
Protected static functions
- static auto formatImpl_(char16* dst, s32 dst_size, const char16* format, std::va_list arg) -> s32
Protected functions
- void assureTerminationImpl_() const override
- void assureTerminationImpl_() const
- void assureTerminationImpl_() const
- auto getMutableStringTop_() -> char16*
- auto formatImpl_(char* s, s32 n, const char* formatStr, va_list args) -> s32
- auto formatImpl_(char16* s, s32 n, const char16* formatStr, va_list args) -> s32
- auto convertFromOtherType_(const SafeStringBase<OtherType>& src, s32 src_size) -> s32
Protected variables
Function documentation
#include <prim/seadSafeString.h>
template<s32 L>
al:: WStringTmp<L>:: __attribute__((always_inline)) BufferedSafeStringBase(char16 *buffer
#include <prim/seadSafeString.h>
template<s32 L>
al:: WStringTmp<L>:: if(size<= 0)
#include <prim/seadSafeString.h>
template<s32 L>
const char16& al:: WStringTmp<L>:: operator[](s32 idx) const
#include <prim/seadSafeString.h>
template<s32 L>
char16* al:: WStringTmp<L>:: getBuffer()
#include <prim/seadSafeString.h>
template<s32 L>
s32 al:: WStringTmp<L>:: getBufferSize() const
#include <prim/seadSafeString.h>
template<s32 L>
s32 al:: WStringTmp<L>:: copy(const SafeStringBase<char16>& src,
s32 copyLength = -1)
| Parameters | |
|---|---|
| src | Source string |
| copyLength | Number of characters from src to copy (must not cause a buffer overflow) |
Copy up to copyLength characters to the beginning of the string, then writes NUL.
#include <prim/seadSafeString.h>
template<s32 L>
s32 al:: WStringTmp<L>:: copyAt(s32 at,
const SafeStringBase<char16>& src,
s32 copyLength = -1)
| Parameters | |
|---|---|
| at | Start position (-1 for end of string) |
| src | Source string |
| copyLength | Number of characters from src to copy (must not cause a buffer overflow) |
Copy up to copyLength characters to the specified position, then writes NUL if the copy makes this string longer.
#include <prim/seadSafeString.h>
template<s32 L>
s32 al:: WStringTmp<L>:: cutOffCopy(const SafeStringBase<char16>& src,
s32 copyLength = -1)
| Parameters | |
|---|---|
| src | Source string |
| copyLength | Number of characters from src to copy |
Copy up to copyLength characters to the beginning of the string, then writes NUL. Silently truncates the source string if the buffer is too small.
#include <prim/seadSafeString.h>
template<s32 L>
s32 al:: WStringTmp<L>:: cutOffCopyAt(s32 at,
const SafeStringBase<char16>& src,
s32 copyLength = -1)
| Parameters | |
|---|---|
| at | Start position (-1 for end of string) |
| src | Source string |
| copyLength | Number of characters from src to copy |
Copy up to copyLength characters to the specified position, then writes NUL if the copy makes this string longer. Silently truncates the source string if the buffer is too small.
#include <prim/seadSafeString.h>
template<s32 L>
s32 al:: WStringTmp<L>:: copyAtWithTerminate(s32 at,
const SafeStringBase<char16>& src,
s32 copyLength = -1)
| Parameters | |
|---|---|
| at | Start position (-1 for end of string) |
| src | Source string |
| copyLength | Number of characters from src to copy (must not cause a buffer overflow) |
Copy up to copyLength characters to the specified position, then always writes NUL.
#include <prim/seadSafeString.h>
template<s32 L>
s32 al:: WStringTmp<L>:: format(const char16* format,
...)
#include <prim/seadSafeString.h>
template<s32 L>
s32 al:: WStringTmp<L>:: format(const char* formatStr,
...)
#include <prim/seadSafeString.h>
template<s32 L>
s32 al:: WStringTmp<L>:: format(const char16* formatStr,
...)
#include <prim/seadSafeString.h>
template<s32 L>
s32 al:: WStringTmp<L>:: formatV(const char16* format,
std::va_list args)
#include <prim/seadSafeString.h>
template<s32 L>
s32 al:: WStringTmp<L>:: formatV(const char* formatStr,
va_list args)
#include <prim/seadSafeString.h>
template<s32 L>
s32 al:: WStringTmp<L>:: formatV(const char16* formatStr,
va_list args)
#include <prim/seadSafeString.h>
template<s32 L>
s32 al:: WStringTmp<L>:: appendWithFormat(const char16* formatStr,
...)
#include <prim/seadSafeString.h>
template<s32 L>
s32 al:: WStringTmp<L>:: appendWithFormat(const char* formatStr,
...)
#include <prim/seadSafeString.h>
template<s32 L>
s32 al:: WStringTmp<L>:: appendWithFormat(const char16* formatStr,
...)
template<s32 L>
s32 al:: WStringTmp<L>:: appendWithFormat(const char* format,
...)
template<s32 L>
s32 al:: WStringTmp<L>:: appendWithFormat(const char16* format,
...)
#include <prim/seadSafeString.h>
template<s32 L>
s32 al:: WStringTmp<L>:: appendWithFormatV(const char16* formatStr,
std::va_list args)
#include <prim/seadSafeString.h>
template<s32 L>
s32 al:: WStringTmp<L>:: appendWithFormatV(const char* formatStr,
va_list args)
#include <prim/seadSafeString.h>
template<s32 L>
s32 al:: WStringTmp<L>:: appendWithFormatV(const char16* formatStr,
va_list args)
template<s32 L>
s32 al:: WStringTmp<L>:: appendWithFormatV(const char* format,
std::va_list args)
template<s32 L>
s32 al:: WStringTmp<L>:: appendWithFormatV(const char16* format,
std::va_list args)
#include <prim/seadSafeString.h>
template<s32 L>
s32 al:: WStringTmp<L>:: append(char16 c)
Append a character.
#include <prim/seadSafeString.h>
template<s32 L>
s32 al:: WStringTmp<L>:: chop(s32 num)
| Returns | the number of characters that were removed |
|---|
Remove num characters from the end of the string.
#include <prim/seadSafeString.h>
template<s32 L>
s32 al:: WStringTmp<L>:: chopMatchedChar(char16 c)
| Returns | the number of characters that were removed |
|---|
Remove the last character if it is equal to c.
#include <prim/seadSafeString.h>
template<s32 L>
s32 al:: WStringTmp<L>:: chopMatchedChar(const char16* characters)
| Parameters | |
|---|---|
| characters | List of characters to remove |
| Returns | the number of characters that were removed |
Remove the last character if it is equal to any of the specified characters.
#include <prim/seadSafeString.h>
template<s32 L>
s32 al:: WStringTmp<L>:: chopUnprintableAsciiChar()
| Returns | the number of characters that were removed |
|---|
Remove the last character if it is unprintable.
#include <prim/seadSafeString.h>
template<s32 L>
s32 al:: WStringTmp<L>:: rstrip(const char16* characters)
| Parameters | |
|---|---|
| characters | List of characters to remove |
| Returns | the number of characters that were removed |
Remove trailing characters that are in the specified list.
#include <prim/seadSafeString.h>
template<s32 L>
s32 al:: WStringTmp<L>:: rstripUnprintableAsciiChars()
| Returns | the number of characters that were removed |
|---|
Remove trailing characters that are unprintable.
#include <prim/seadSafeString.h>
template<s32 L>
s32 al:: WStringTmp<L>:: trim(s32 trim_length)
| Returns | the new length |
|---|
Trim a string to only keep trimLength characters.
#include <prim/seadSafeString.h>
template<s32 L>
s32 al:: WStringTmp<L>:: trimMatchedString(const SafeStringBase<char16>& suffix)
| Returns | the new length |
|---|
Remove the specified suffix from the string if it ends with the suffix.
#include <prim/seadSafeString.h>
template<s32 L>
s32 al:: WStringTmp<L>:: removeSuffix(const SafeStringBase<char16>& suffix)
| Returns | the new length |
|---|
Remove the specified suffix from the string if it ends with the suffix. Alias of trimMatchedString.
#include <prim/seadSafeString.h>
template<s32 L>
s32 al:: WStringTmp<L>:: replaceChar(char16 old_char,
char16 new_char)
| Returns | the number of characters that were replaced |
|---|
#include <prim/seadSafeString.h>
template<s32 L>
s32 al:: WStringTmp<L>:: replaceCharList(const SafeStringBase<char16>& old_chars,
const SafeStringBase<char16>& new_chars)
| Returns | the number of characters that were replaced |
|---|
#include <prim/seadSafeString.h>
template<s32 L>
s32 al:: WStringTmp<L>:: setReplaceString(const SafeStringBase<char16>& target_str,
const SafeStringBase<char16>& old_str,
const SafeStringBase<char16>& new_str)
| Returns | the number of replaced occurrences |
|---|
Set the contents of this string to target_str, after replacing occurrences of old_str in target_str with new_str.
#include <prim/seadSafeString.h>
template<s32 L>
s32 al:: WStringTmp<L>:: replaceString(const SafeStringBase<char16>& old_str,
const SafeStringBase<char16>& new_str)
| Returns | the number of replaced occurrences |
|---|
Replace occurrences of old_str in this string with new_str.
#include <prim/seadSafeString.h>
template<s32 L>
s32 al:: WStringTmp<L>:: convertFromMultiByteString(const SafeStringBase<char>& str,
s32 str_length)
#include <prim/seadSafeString.h>
template<s32 L>
s32 al:: WStringTmp<L>:: convertFromWideCharString(const SafeStringBase<char16>& str,
s32 str_length)
#include <prim/seadSafeString.h>
template<s32 L>
void al:: WStringTmp<L>:: clear()
#include <prim/seadSafeString.h>
template<s32 L>
static s32 al:: WStringTmp<L>:: formatImpl_(char16* dst,
s32 dst_size,
const char16* format,
std::va_list arg) protected
#include <prim/seadSafeString.h>
template<s32 L>
void al:: WStringTmp<L>:: assureTerminationImpl_() const override protected
template<s32 L>
void al:: WStringTmp<L>:: assureTerminationImpl_() const protected
template<s32 L>
void al:: WStringTmp<L>:: assureTerminationImpl_() const protected
#include <prim/seadSafeString.h>
template<s32 L>
char16* al:: WStringTmp<L>:: getMutableStringTop_() protected
template<s32 L>
s32 al:: WStringTmp<L>:: formatImpl_(char* s,
s32 n,
const char* formatStr,
va_list args) protected
#include <prim/seadSafeString.h>
template<s32 L>
s32 al:: WStringTmp<L>:: convertFromOtherType_(const SafeStringBase<OtherType>& src,
s32 src_size) protected
Variable documentation
#include <prim/seadSafeString.h>
template<s32 L>
char16 al:: WStringTmp<L>:: mBuffer
#include <prim/seadSafeString.h>
template<s32 L>
s32 al:: WStringTmp<L>:: size
#include <prim/seadSafeString.h>
template<s32 L>
al:: WStringTmp<L>:: else
#include <prim/seadSafeString.h>
template<s32 L>
s32 al:: WStringTmp<L>:: mBufferSize protected