CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
|
String class used across the library. Is a substitute for C# System.String when translating code. For optimization reasons, isn't considered an Object subclass. This type should be allocated on stack and passed to functions by value or by reference. Never use System::SmartPtr class to manage objects of this type. More...
#include <string.h>
Public Types | |
using | reverse_iterator = std::reverse_iterator< const char16_t * > |
Reverse iterator type. More... | |
Public Member Functions | |
String () | |
Default constructor. Creates string object which is considered null. More... | |
template<typename T > | |
String (T &value, typename std::enable_if< IsStringLiteral< T, char16_t >::value >::type *=nullptr) | |
Constructs string based on string literal. Considers literal a null-terminated string, calculates target string length based on literal size. More... | |
template<typename T > | |
String (const T &value, typename std::enable_if< IsStringPointer< T, char16_t >::value >::type *=nullptr) | |
Constructs string based on character string pointer. Treats pointed string as null-terminated, calculates target string length based on null character. More... | |
template<typename T > | |
String (T &value, typename std::enable_if< IsStringLiteral< T, char >::value >::type *=nullptr) | |
Constructs string based on string literal. Considers literal a null-terminated string in UTF8, calculates target string length based on literal size. More... | |
template<typename T > | |
String (const T &value, typename std::enable_if< IsStringPointer< T, char >::value >::type *=nullptr) | |
Constructs string based on character string pointer. Treats pointed string as null-terminated in UTF8, calculates target string length based on null character. More... | |
String (const char16_t *str, int length) | |
Constructs string from character string pointer and explicit length. More... | |
String (const char *str, int length) | |
Constructs string from character string pointer and explicit length. More... | |
String (const char16_t *str, int start, int length) | |
Constructs string from character string pointer from starting position using length. More... | |
String (const char16_t ch, int count) | |
Fill constructor. More... | |
template<typename T > | |
String (const T &value, typename std::enable_if< std::is_same< T, std::nullptr_t >::value >::type *=nullptr) | |
Nullptr constructor. Declared as template to resolve priorities with other template constructors. More... | |
template<typename T > | |
String (T &value, typename std::enable_if< IsStringLiteral< T, wchar_t >::value >::type *=nullptr) | |
Constructs string based on widestring literal. Considers literal a null-terminated string, calculates target string length based on literal size. Conversion from wchar_t is time-consuming on some platforms, so no implicit conversions are allowed. More... | |
template<typename T > | |
String (const T &value, typename std::enable_if< IsStringPointer< T, wchar_t >::value >::type *=nullptr) | |
Constructs string based on widecharacter string pointer. Treats pointed string as null-terminated, calculates target string length based on null character. Conversion from wchar_t is time-consuming on some platforms, so no implicit conversions are allowed. More... | |
String (const wchar_t *str, int length) | |
Constructs string from widecharacter string pointer and explicit length. Conversion from wchar_t is time-consuming on some platforms, so no implicit conversions are allowed. More... | |
String (const wchar_t ch, int count=1) | |
Fill constructor. Conversion from wchar_t is time-consuming on some platforms, so no implicit conversions are allowed. More... | |
String (const String &str) | |
Copy constructor. More... | |
String (String &&str) noexcept | |
Move constructor. More... | |
String (const ArrayPtr< char16_t > &arr) | |
Converts whole character array to string. More... | |
String (const ArrayPtr< char16_t > &arr, int offset, int len) | |
Converts character array subrange to string. If parameters are out of array bounds, empty string is constructed. More... | |
~String () | |
Destructor. More... | |
const UChar * | u_str () const |
Returns ICU-styled null-terminated buffer. May reallocate the string. More... | |
const UChar * | begin () const |
Returns pointer to the beginning of actual string buffer. Never reallocates anything. Doesn't guarantee buffer to be null-terminated. More... | |
const UChar * | end () const |
Returns pointer to the end of actual string buffer. Never reallocates anything. Doesn't guarantee buffer to be null-terminated. More... | |
reverse_iterator | rbegin () const |
Returns reverse iterator to the last character (if any) of actual string buffer. More... | |
reverse_iterator | rend () const |
Returns reverse iterator to the before first character (if any) of actual string buffer. More... | |
bool | IsNullOrEmpty () const |
Checks if string is empty or is considered null. More... | |
bool | IsNull () const |
Checks if string is considered null. String is null and only if it is constructed via String() constructor, moved, copied or assigned from null string or reset() method was called. More... | |
bool | IsEmpty () const |
Checks if string is both non-null and empty. More... | |
std::string | ToUtf8String () const |
Converts string to std::string. Uses UTF-8 encoding. More... | |
std::wstring | ToWCS () const |
Converts string to std::wstring. More... | |
std::u16string | ToU16Str () const |
Converts string to std::u16string. More... | |
std::u32string | ToU32Str () const |
Converts string to std::u32string. More... | |
std::string | ToAsciiString () const |
Converts string to std::string. Uses ASCII encoding. More... | |
String & | reset () |
Sets string to null. Is analogous to 'string_variable_name = null' in C#. More... | |
int | get_Length () const |
Gets string length. More... | |
char_t | operator[] (int index) const |
Gets character at specified position. More... | |
String & | SetCharAt (int index, char_t ch) |
Sets character at specified position. More... | |
String & | operator= (const String &str) |
Assignment operator. More... | |
String & | operator= (String &&str) noexcept |
Move assignment operator. More... | |
String | operator+ (const String &str) const |
String concatenation operator. More... | |
template<typename T , std::enable_if_t< IsStringLiteral< T, char_t >::value > * = nullptr> | |
String | operator+ (const T &arg) const |
String concatenation with string literal or character string pointer. More... | |
String | operator+ (char_t x) const |
Adds character to the end of the string. More... | |
String | operator+ (int i) const |
Adds integer value string representation to the end of the string. More... | |
String | operator+ (uint32_t i) const |
Adds unsigned integer value string representation to the end of the string. More... | |
String | operator+ (double d) const |
Adds floating point value string representation to the end of the string. More... | |
String | operator+ (int64_t v) const |
Adds integer value string representation to the end of the string. More... | |
template<typename T , std::enable_if_t< IsSmartPtr< T >::value > * = nullptr> | |
String | operator+ (const T &value) const |
Adds reference type object string representation to the end of the string. More... | |
template<typename T , std::enable_if_t<!IsSmartPtr< T >::value &&!std::is_scalar< T >::value &&!std::is_array< T >::value > * = nullptr> | |
String | operator+ (const T &value) const |
Adds value type object string representation to the end of the string. More... | |
template<typename T , std::enable_if_t< std::is_same< T, bool >::value > * = nullptr> | |
String | operator+ (T arg) const |
Adds boolean value string representation to the end of the string. More... | |
String & | operator+= (char_t c) |
Concatenation assignment operator. More... | |
String & | operator+= (const String &str) |
Concatenation assignment operator. More... | |
String & | operator+= (double value) |
Concatenation assignment operator. More... | |
String & | operator+= (uint8_t value) |
Concatenation assignment operator. More... | |
String & | operator+= (int16_t value) |
Concatenation assignment operator. More... | |
String & | operator+= (uint16_t value) |
Concatenation assignment operator. More... | |
String & | operator+= (int32_t value) |
Concatenation assignment operator. More... | |
String & | operator+= (uint32_t value) |
Concatenation assignment operator. More... | |
String & | operator+= (int64_t value) |
Concatenation assignment operator. More... | |
String & | operator+= (uint64_t value) |
Concatenation assignment operator. More... | |
template<typename T , std::enable_if_t< std::is_same< T, bool >::value > * = nullptr> | |
String & | operator+= (T value) |
Concatenation assignment operator. More... | |
bool | operator== (const String &str) const |
Equality comparison operator. More... | |
bool | operator== (std::nullptr_t) const |
Checks if string is null. Applies same logic as IsNull() call. More... | |
bool | operator!= (const String &str) const |
Non-equality comparison operator. More... | |
bool | operator!= (std::nullptr_t) const |
Checks if string is not null. Applies same logic as IsNull() call. More... | |
bool | operator< (const String &str) const |
Order-compares strings. More... | |
String | Clone () const |
Creates a copy of current string. More... | |
String | ToString () const |
Wrapper for handling String class in contexts where ToString() is being called on value type objects. More... | |
String | ToString (const SharedPtr< IFormatProvider > &) const |
Wrapper for handling String class in contexts where ToString() is being called on value type objects. More... | |
int | GetHashCode () const |
Hashes contained string. Implemented in ICU, doesn't match hashes in C#. More... | |
bool | Equals (const String &str, System::StringComparison comparison_type) const |
String equality comparison. Several modes provided by StringComparison enumeration are supported. More... | |
bool | Equals (const String &str) const |
String equality comparison. Uses System::StringComparison::Ordinal comparison mode. More... | |
bool | Contains (const String &str) const |
Checks if str is a substring of current string. More... | |
int | CompareTo (const String &str) const |
Compares two strings in 'less-equals-more' style. Uses current culture. More... | |
void | CopyTo (int sourceIndex, const ArrayPtr< char_t > &destination, int destinationIndex, int count) const |
Copies string characters into existing array elements. No resize is being done. More... | |
String | Normalize (System::Text::NormalizationForm form) const |
Normalizes unicode string using normalization form specified. More... | |
bool | IsNormalized (System::Text::NormalizationForm form) const |
Checks if unicode string is normalized using normalization form specified. More... | |
bool | StartsWith (const String &value) const |
Checks if string begins with specified substring. More... | |
bool | StartsWith (const String &value, System::StringComparison comparisonType) const |
Checks if string begins with specified substring. More... | |
bool | StartsWith (const String &value, bool ignoreCase, const SharedPtr< System::Globalization::CultureInfo > &culture=nullptr) const |
Checks if string begins with specified substring. More... | |
bool | EndsWith (const String &value) const |
Checks if string ends with specified substring. More... | |
bool | EndsWith (const String &value, System::StringComparison comparisonType) const |
Checks if string ends with specified substring. More... | |
bool | EndsWith (const String &value, bool ignoreCase, const SharedPtr< System::Globalization::CultureInfo > &culture=nullptr) const |
Checks if string ends with specified substring. More... | |
ArrayPtr< char_t > | ToCharArray (int32_t startIndex=0, int32_t length=INT32_MAX) const |
Converts string or substring to array of characters. More... | |
ArrayPtr< uint8_t > | ToByteArray (int32_t startIndex=0, int32_t length=INT32_MAX, bool LE=true) const |
Converts string or substring to array of bytes. More... | |
String | ToUpper () const |
Converts all string's characters to upper case. More... | |
String | ToLower () const |
Converts all string's characters to lower case. More... | |
String | ToLower (const SharedPtr< System::Globalization::CultureInfo > &cultureInfo) const |
Converts all string's characters to lower case using specific culture. More... | |
String | ToUpper (const SharedPtr< System::Globalization::CultureInfo > &cultureInfo) const |
Converts all string's characters to upper case using specific culture. More... | |
String | ToUpperInvariant () const |
Converts all string's characters to upper case using invariant culture. More... | |
String | ToLowerInvariant () const |
Converts all string's characters to lower case using invariant culture. More... | |
String | Substring (int32_t startIndex) const |
Extracts substring. More... | |
String | Substring (int32_t startIndex, int32_t length) const |
Extracts substring. More... | |
String | Remove (int32_t startIndex, int32_t count=INT32_MAX) const |
Extracts everything but substring from current string. More... | |
bool | Is (const System::TypeInfo &target) const |
Checks if string object is of type specified by TypeInfo passed. More... | |
int | IndexOf (const String &str, System::StringComparison comparison_type) const |
Substring forward lookup. More... | |
int | IndexOf (char_t c, int startIndex=0) const |
Character forward lookup. More... | |
int | IndexOf (char_t c, int startIndex, int count) const |
Character forward lookup in substring. More... | |
int | IndexOf (const String &str, int startIndex=0) const |
Substring forward lookup. More... | |
int | IndexOf (const String &str, int startIndex, System::StringComparison comparison_type) const |
Substring forward lookup. More... | |
int | IndexOf (const String &value, int startIndex, int count, System::StringComparison comparisonType) const |
Substring forward lookup. More... | |
int | IndexOf (const String &str, int startIndex, int count) const |
Substring forward lookup. More... | |
int | IndexOfAny (char_t c, int startIndex=0) const |
Character forward lookup. More... | |
int | IndexOfAny (const String &str, int startIndex=0) const |
Consequently looks for all characters of str in this. If first character is found, its position is returned, otherwise looks for the second one and so on. More... | |
int | IndexOfAny (const ArrayPtr< char_t > &anyOf) const |
Looks for any of passed characters through the whole string. Compares first string character to all characters in anyOf, then compares second one and so on. Returns index of the first one matching any of the target characters. More... | |
int | IndexOfAny (const ArrayPtr< char_t > &anyOf, int32_t startindex) const |
Looks for any of passed characters through substring. Compares first string character to all characters in anyOf, then compares second one and so on. Returns index of the first one matching any of the target characters. More... | |
int | IndexOfAny (const ArrayPtr< char_t > &anyOf, int32_t startindex, int32_t count) const |
Looks for any of passed characters through substring. Compares first string character to all characters in anyOf, then compares second one and so on. Returns index of the first one matching any of the target characters. More... | |
int | LastIndexOf (const String &str, int startIndex=INT32_MAX) const |
Substring backward lookup. More... | |
int | LastIndexOf (const String &str, System::StringComparison comparison_type) const |
Substring backward lookup. More... | |
int | LastIndexOf (const String &str, int startIndex, System::StringComparison comparison_type) const |
Substring backward lookup. More... | |
int | LastIndexOf (const String &value, int startIndex, int count, StringComparison comparisonType) const |
Substring backward lookup. More... | |
int | LastIndexOf (char_t value) const |
Character backward lookup. More... | |
int | LastIndexOf (char_t value, int32_t startIndex) const |
Character backward lookup. More... | |
int | LastIndexOf (char_t value, int32_t startIndex, int32_t count) const |
Character backward lookup. More... | |
int | LastIndexOfAny (const ArrayPtr< char_t > &anyOf) const |
Looks for any of passed characters through whole string backwardly. Compares last string character to all characters in anyOf, then compares previous one and so on. Returns index of the first match found. More... | |
int | LastIndexOfAny (const ArrayPtr< char_t > &anyOf, int32_t startindex) const |
Looks for any of passed characters through substring backwardly. Compares last string character to all characters in anyOf, then compares previous one and so on. Returns index of the first match found. More... | |
int | LastIndexOfAny (const ArrayPtr< char_t > &anyOf, int32_t startindex, int32_t count) const |
Looks for any of passed characters through substring backwardly. Compares last string character to all characters in anyOf, then compares previous one and so on. Returns index of the first match found. More... | |
String | Trim () const |
Removes all whitespace characters from both beginning and end of the string. More... | |
String | Trim (char_t ch) const |
Removes all occurrences of passed character from both beginning and end of the string. More... | |
String | Trim (const String &anyOf) const |
Removes all occurrences of passed characters from both beginning and end of the string. More... | |
String | Trim (const ArrayPtr< char_t > &anyOf) const |
Removes all occurrences of passed characters from both beginning and end of the string. More... | |
String | TrimStart () const |
Removes all whitespace characters from beginning of the string. More... | |
String | TrimStart (char_t ch) const |
Removes all occurrences of passed character from beginning of the string. More... | |
String | TrimStart (const String &anyOf) const |
Removes all occurrences of passed characters from beginning of the string. More... | |
String | TrimStart (const ArrayPtr< char_t > &anyOf) const |
Removes all occurrences of passed characters from beginning of the string. More... | |
String | TrimEnd () const |
Removes all whitespace characters from end of the string. More... | |
String | TrimEnd (char_t ch) const |
Removes all occurrences of passed character from end of the string. More... | |
String | TrimEnd (const String &anyOf) const |
Removes all occurrences of passed characters from end of the string. More... | |
String | TrimEnd (const ArrayPtr< char_t > &anyOf) const |
Removes all occurrences of passed characters from end of the string. More... | |
String | PadLeft (int totalWidth, char_t c=u' ') const |
Adds padding on the left of original string. More... | |
String | PadRight (int totalWidth, char_t c=u' ') const |
Adds padding on the right of original string. More... | |
String | Replace (char_t oldValue, char_t newValue) const |
Replaces all occurrences of character in the string. More... | |
String | Replace (const String &oldValue, const String &newValue) const |
Replaces all occurrences of lookup in this string. More... | |
String | Insert (int startIndex, const String &value) const |
Inserts substring at specified position. More... | |
ArrayPtr< String > | Split (char_t separator=u' ', StringSplitOptions opt=StringSplitOptions::None) const |
Splits string by character. More... | |
ArrayPtr< String > | Split (char_t separator, int32_t count, StringSplitOptions opt=StringSplitOptions::None) const |
Splits string by character. More... | |
ArrayPtr< String > | Split (char_t separatorA, char_t separatorB, StringSplitOptions opt=StringSplitOptions::None) const |
Splits string by one of two characters. More... | |
ArrayPtr< String > | Split (const ArrayPtr< char_t > &separators, StringSplitOptions opt=StringSplitOptions::None) const |
Splits string by one of characters specified. More... | |
ArrayPtr< String > | Split (const ArrayPtr< char_t > &separators, int32_t count, StringSplitOptions opt=StringSplitOptions::None) const |
Splits string by one of characters specified. More... | |
ArrayPtr< String > | Split (const String &separator, StringSplitOptions opt=StringSplitOptions::None) const |
Splits string by substring. More... | |
ArrayPtr< String > | Split (const String &separator, int count, StringSplitOptions opt=StringSplitOptions::None) const |
Splits string by substring. More... | |
ArrayPtr< String > | Split (const ArrayPtr< String > &separators, StringSplitOptions opt=StringSplitOptions::None) const |
Splits string by substring. More... | |
ArrayPtr< String > | Split (const ArrayPtr< String > &separators, int count, StringSplitOptions opt=StringSplitOptions::None) const |
Splits string by substring. Currently, only supports separators array of zero or one elements. More... | |
String (const codeporting_icu::UnicodeString &str) | |
Wraps UnicodeString into String. More... | |
String (codeporting_icu::UnicodeString &&str) noexcept | |
Move constructor. More... | |
String (const std::wstring &str) | |
Creates String from widestring. More... | |
String (const std::u16string &str) | |
Creates String from utf16 string. More... | |
String (const std::string &utf8str) | |
Creates String from std::string string presented in format UTF-8. More... | |
String (const std::u32string &u32str) | |
Creates String from std::u32string string. More... | |
bool | IsAsciiString () const |
Indicates if a String contains ASCII symbols only. More... | |
int | FastToAscii (char buffer[], int buffer_size) const |
Tries to convert a String to an ASCII string. More... | |
Static Public Member Functions | |
static bool | IsNullOrEmpty (const String &str) |
Checks if passed string is null or empty. More... | |
static bool | IsNullOrWhiteSpace (const String &str) |
Indicates whether a specified string is null, empty, or consists only of white-space characters. More... | |
static bool | Equals (const String &strA, const String &strB) |
Equal-compares two strings using Ordial comparison mode. More... | |
static bool | Equals (const String &strA, const String &strB, System::StringComparison comparison_type) |
Equal-compares two strings. More... | |
static int | Compare (const String &strA, int indexA, const String &strB, int indexB, int length, bool ignoreCase=false) |
Less-equal-greater-compares two substrings. More... | |
static int | Compare (const String &strA, int indexA, const String &strB, int indexB, int length, bool ignoreCase, const SharedPtr< System::Globalization::CultureInfo > &ci) |
Less-equal-greater-compares two substrings. More... | |
static int | Compare (const String &strA, const String &strB, System::StringComparison comparison_type) |
Less-equal-greater-compares two strings. More... | |
static int | Compare (const String &strA, int indexA, const String &strB, int indexB, int length, System::StringComparison comparison_type) |
Less-equal-greater-compares two strings. More... | |
static int | Compare (const String &strA, const String &strB, bool ignoreCase=false) |
Less-equal-greater-compares two strings. More... | |
static int | Compare (const String &strA, const String &strB, bool ignoreCase, const SharedPtr< System::Globalization::CultureInfo > &ci) |
Less-equal-greater-compares two strings. More... | |
static int | CompareOrdinal (const String &strA, const String &strB) |
Less-equal-greater-compares two strings using ordinal mode. More... | |
static int | CompareOrdinal (const String &strA, int indexA, const String &strB, int indexB, int length) |
Less-equal-greater-compares two strings using ordinal mode. More... | |
static String | Join (const String &separator, const ArrayPtr< String > &parts, int startIndex=0, int count=-1) |
Joins array using string as separator. More... | |
static String | Join (const String &separator, const System::Details::ArrayView< String > &parts, int startIndex=0, int count=-1) |
Joins array using string as separator. More... | |
static String | Join (const String &separator, const SharedPtr< System::Collections::Generic::IEnumerable< String > > &parts) |
Joins array using string as separator. More... | |
static String | Join (const String &separator, const ArrayPtr< SharedPtr< Object > > &parts) |
Joins array using string as separator. More... | |
static String | Concat (const ArrayPtr< String > &parts) |
Concatenates strings. More... | |
static String | Concat (const String &str0, const String &str1) |
Concatenates strings. More... | |
static String | Concat (const String &str0, const String &str1, const String &str2) |
Concatenates strings. More... | |
static String | Concat (const String &str0, const String &str1, const String &str2, const String &str3) |
Concatenates strings. More... | |
static String | Copy (const String &str) |
Creates string copy. More... | |
template<class... Args> | |
static String | Format (const SharedPtr< IFormatProvider > &fp, const String &format, const Args &... args) |
Formats string in C# style. More... | |
template<class... Args> | |
static String | Format (std::nullptr_t, const String &format, const Args &... args) |
Formats string in C# style. More... | |
template<std::size_t N, class... Args> | |
static String | Format (std::nullptr_t, const char16_t(&format)[N], const Args &... args) |
Formats string in C# style. More... | |
template<class... Args> | |
static String | Format (const String &format, const Args &... args) |
Formats string in C# style. More... | |
template<class T > | |
static String | Format (const String &format, const System::ArrayPtr< T > &args) |
Formats string in C# style. More... | |
static String | FromUtf8 (const char *utf8) |
Creates String from utf8 string. More... | |
static String | FromUtf8 (const char *utf8, int len) |
Creates String from utf8 string. More... | |
static String | FromUtf8 (const uint8_t *utf8) |
Creates String from utf8 string. More... | |
static String | FromUtf8 (const std::string &utf8) |
Creates String from utf8 string. More... | |
static String | FromWCS (const std::wstring &wcs) |
Creates String from widestring. More... | |
static String | FromUtf32 (const uint32_t *utf32, int32_t length) |
Creates String from utf32 string. More... | |
static String | FromUtf16 (const std::u16string &u16str) |
Creates String from utf16 string. More... | |
static String | FromAscii (const char *asciiStr) |
Creates String from ASCII string. More... | |
static String | FromAscii (const char *asciiStr, int len) |
Creates String from ASCII string. More... | |
static String | FromAscii (const std::string &asciiStr) |
Creates String from ASCII string. More... | |
Static Public Attributes | |
static const String | Empty |
Empty string. More... | |
static const String | Null |
Null string. More... | |
Protected Member Functions | |
String & | Append (const char16_t *src, int32_t startIndex, int32_t count) |
Puts some characters into string. Changes string size. More... | |
Protected Attributes | |
Detail::UnicodeStringHolder | m_str |
Actual string value. More... | |
uintptr_t | m_state |
String state. Contains value 0 if string is null, 1 if string is constructed from string literal. More... | |
String class used across the library. Is a substitute for C# System.String when translating code. For optimization reasons, isn't considered an Object subclass. This type should be allocated on stack and passed to functions by value or by reference. Never use System::SmartPtr class to manage objects of this type.
using System::String::reverse_iterator = std::reverse_iterator<const char16_t*> |
Reverse iterator type.
System::String::String | ( | ) |
Default constructor. Creates string object which is considered null.
|
inline |
Constructs string based on string literal. Considers literal a null-terminated string, calculates target string length based on literal size.
value | String literal pointer. |
|
inline |
Constructs string based on character string pointer. Treats pointed string as null-terminated, calculates target string length based on null character.
value | Character string pointer. |
|
inlineexplicit |
Constructs string based on string literal. Considers literal a null-terminated string in UTF8, calculates target string length based on literal size.
value | String literal pointer. |
|
inlineexplicit |
Constructs string based on character string pointer. Treats pointed string as null-terminated in UTF8, calculates target string length based on null character.
value | Character string pointer. |
System::String::String | ( | const char16_t * | str, |
int | length | ||
) |
Constructs string from character string pointer and explicit length.
str | String pointer, may be literal or array. |
length | Explicit string length |
System::String::String | ( | const char * | str, |
int | length | ||
) |
Constructs string from character string pointer and explicit length.
str | String pointer to the UTF8 data, may be literal or array. |
length | Explicit string length |
System::String::String | ( | const char16_t * | str, |
int | start, | ||
int | length | ||
) |
|
explicit |
Fill constructor.
ch | Fill character. |
count | Target length. |
|
inline |
Nullptr constructor. Declared as template to resolve priorities with other template constructors.
T | Should be nullptr_t |
value | nullptr |
|
inlineexplicit |
Constructs string based on widestring literal. Considers literal a null-terminated string, calculates target string length based on literal size. Conversion from wchar_t is time-consuming on some platforms, so no implicit conversions are allowed.
value | String literal pointer. |
|
inlineexplicit |
Constructs string based on widecharacter string pointer. Treats pointed string as null-terminated, calculates target string length based on null character. Conversion from wchar_t is time-consuming on some platforms, so no implicit conversions are allowed.
value | Character string pointer. |
|
explicit |
Constructs string from widecharacter string pointer and explicit length. Conversion from wchar_t is time-consuming on some platforms, so no implicit conversions are allowed.
str | String pointer, may be literal or array. |
length | Explicit string length |
|
explicit |
Fill constructor. Conversion from wchar_t is time-consuming on some platforms, so no implicit conversions are allowed.
ch | Fill character. |
count | Target length. |
|
noexcept |
Move constructor.
str | String to move data from. |
System::String::String | ( | const ArrayPtr< char16_t > & | arr | ) |
Converts whole character array to string.
arr | Array to convert to string. |
System::String::String | ( | const ArrayPtr< char16_t > & | arr, |
int | offset, | ||
int | len | ||
) |
Converts character array subrange to string. If parameters are out of array bounds, empty string is constructed.
arr | Character array. |
offset | Subarray start index. |
len | Subarray length. |
System::String::~String | ( | ) |
Destructor.
|
explicit |
|
explicitnoexcept |
Move constructor.
str | UnicodeString to wrap into String. |
|
inlineexplicit |
|
inlineexplicit |
|
explicit |
|
explicit |
|
protected |
Puts some characters into string. Changes string size.
src | Pointer to string to insert. |
startIndex | Index to start insertion at. |
count | Number of characters to insert. |
const UChar * System::String::begin | ( | ) | const |
Returns pointer to the beginning of actual string buffer. Never reallocates anything. Doesn't guarantee buffer to be null-terminated.
String System::String::Clone | ( | ) | const |
Creates a copy of current string.
|
static |
Less-equal-greater-compares two strings.
strA | First string to compare. |
strB | Second string to compare. |
ignoreCase | Specifies whether comparison is case-insensitive. |
ci | Culture to use for comparison. |
|
static |
Less-equal-greater-compares two strings.
strA | First string to compare. |
strB | Second string to compare. |
ignoreCase | Specifies whether comparison is case-insensitive. |
|
static |
Less-equal-greater-compares two strings.
strA | First string to compare. |
strB | Second string to compare. |
comparison_type | Comparison mode. |
|
static |
Less-equal-greater-compares two substrings.
strA | First string to compare. |
indexA | Beginning of first string substring. |
strB | Second string to compare. |
indexB | Beginning of the second string substring. |
length | Number of characters to compare. |
ignoreCase | Specifies whether comparison is case-insensitive. |
ci | Culture to use for comparison. |
|
static |
Less-equal-greater-compares two substrings.
strA | First string to compare. |
indexA | Beginning of first string substring. |
strB | Second string to compare. |
indexB | Beginning of the second string substring. |
length | Number of characters to compare. |
ignoreCase | Specifies whether comparison is case-insensitive. |
|
static |
Less-equal-greater-compares two strings.
strA | First string to compare. |
indexA | Beginning of first string substring. |
strB | Second string to compare. |
indexB | Beginning of the second string substring. |
length | Number of characters to compare. |
comparison_type | Comparison mode. |
Less-equal-greater-compares two strings using ordinal mode.
strA | First string to compare. |
strB | Second string to compare. |
|
static |
Less-equal-greater-compares two strings using ordinal mode.
strA | First string to compare. |
indexA | Beginning of first string substring. |
strB | Second string to compare. |
indexB | Beginning of the second string substring. |
length | Number of characters to compare. |
int System::String::CompareTo | ( | const String & | str | ) | const |
Compares two strings in 'less-equals-more' style. Uses current culture.
str | String to compare this to. |
Concatenates strings.
parts | Strings to concatenate. |
Concatenates strings.
str0 | First string to concatenate. |
str1 | Second string to concatenate. |
|
static |
Concatenates strings.
str0 | First string to concatenate. |
str1 | Second string to concatenate. |
str2 | Third string to concatenate. |
|
static |
Concatenates strings.
str0 | First string to concatenate. |
str1 | Second string to concatenate. |
str2 | Third string to concatenate. |
str3 | Fourth string to concatenate. |
bool System::String::Contains | ( | const String & | str | ) | const |
Checks if str is a substring of current string.
str | Lookup string. |
void System::String::CopyTo | ( | int | sourceIndex, |
const ArrayPtr< char_t > & | destination, | ||
int | destinationIndex, | ||
int | count | ||
) | const |
Copies string characters into existing array elements. No resize is being done.
sourceIndex | In-string index to start reading from. |
destination | Destination array. |
destinationIndex | In-array index to start writing from. |
count | Number of characters to copy. |
const UChar * System::String::end | ( | ) | const |
Returns pointer to the end of actual string buffer. Never reallocates anything. Doesn't guarantee buffer to be null-terminated.
bool System::String::EndsWith | ( | const String & | value | ) | const |
Checks if string ends with specified substring.
value | Lookup string. |
bool System::String::EndsWith | ( | const String & | value, |
bool | ignoreCase, | ||
const SharedPtr< System::Globalization::CultureInfo > & | culture = nullptr |
||
) | const |
Checks if string ends with specified substring.
value | Lookup string. |
ignoreCase | Specifies whether comparison is case-insensitive. |
culture | Culture to use while performing string comparison. |
bool System::String::EndsWith | ( | const String & | value, |
System::StringComparison | comparisonType | ||
) | const |
Checks if string ends with specified substring.
value | Lookup string. |
comparisonType | Comparison mode, see System::StringComparison for details. |
bool System::String::Equals | ( | const String & | str | ) | const |
String equality comparison. Uses System::StringComparison::Ordinal comparison mode.
str | String to compare against the current one. |
bool System::String::Equals | ( | const String & | str, |
System::StringComparison | comparison_type | ||
) | const |
String equality comparison. Several modes provided by StringComparison enumeration are supported.
str | String to compare against the current one. |
comparison_type | Comparison mode (see System::StringComparison for details). |
Equal-compares two strings using Ordial comparison mode.
strA | First string to compare. |
strB | Second string to compare. |
|
static |
Equal-compares two strings.
strA | First string to compare. |
strB | Second string to compare. |
comparison_type | Comparison mode. |
int System::String::FastToAscii | ( | char | buffer[], |
int | buffer_size | ||
) | const |
|
static |
Formats string in C# style.
Args | Arguments to format string. |
fp | Format provider to use to convert arguments to strings. |
format | Format string. |
args | Arguments to format string. |
|
static |
Formats string in C# style.
Args | Arguments to format string. |
format | Format string. |
args | Arguments to format string. |
|
static |
Formats string in C# style.
T | Arguments to format string. |
format | Format string. |
args | Arguments to format string. |
|
static |
Formats string in C# style.
Args | Arguments to format string. |
format | Format string. |
args | Arguments to format string. |
|
static |
Formats string in C# style.
Args | Arguments to format string. |
format | Format string. |
args | Arguments to format string. |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
int System::String::get_Length | ( | ) | const |
Gets string length.
int System::String::GetHashCode | ( | ) | const |
Hashes contained string. Implemented in ICU, doesn't match hashes in C#.
int System::String::IndexOf | ( | char_t | c, |
int | startIndex, | ||
int | count | ||
) | const |
Character forward lookup in substring.
c | Character to look for. |
startIndex | Index to start lookup at. |
count | Number of characters to look through. |
int System::String::IndexOf | ( | char_t | c, |
int | startIndex = 0 |
||
) | const |
Character forward lookup.
c | Character to look for. |
startIndex | Index to start lookup at. |
int System::String::IndexOf | ( | const String & | str, |
int | startIndex, | ||
int | count | ||
) | const |
Substring forward lookup.
str | Substring to look for. |
startIndex | Position in source string to start lookup through. |
count | number of characters to look through. |
int System::String::IndexOf | ( | const String & | str, |
int | startIndex, | ||
System::StringComparison | comparison_type | ||
) | const |
Substring forward lookup.
str | Substring to look for. |
startIndex | Position in source string to start lookup through. |
comparison_type | Comparison mode. |
int System::String::IndexOf | ( | const String & | str, |
int | startIndex = 0 |
||
) | const |
Substring forward lookup.
str | Substring to look for. |
startIndex | Position in source string to start lookup through. |
int System::String::IndexOf | ( | const String & | str, |
System::StringComparison | comparison_type | ||
) | const |
Substring forward lookup.
str | Substring to look for. |
comparison_type | Comparison mode. |
int System::String::IndexOf | ( | const String & | value, |
int | startIndex, | ||
int | count, | ||
System::StringComparison | comparisonType | ||
) | const |
Substring forward lookup.
value | Substring to look for. |
startIndex | Position in source string to start lookup through. |
count | number of characters to look through. |
comparisonType | Comparison mode. |
int System::String::IndexOfAny | ( | char_t | c, |
int | startIndex = 0 |
||
) | const |
Character forward lookup.
c | Character to look for. |
startIndex | Index to start lookup at. |
int System::String::IndexOfAny | ( | const ArrayPtr< char_t > & | anyOf | ) | const |
Looks for any of passed characters through the whole string. Compares first string character to all characters in anyOf, then compares second one and so on. Returns index of the first one matching any of the target characters.
anyOf | Array of characters to look for. Order doesn't matter. |
int System::String::IndexOfAny | ( | const ArrayPtr< char_t > & | anyOf, |
int32_t | startindex | ||
) | const |
Looks for any of passed characters through substring. Compares first string character to all characters in anyOf, then compares second one and so on. Returns index of the first one matching any of the target characters.
anyOf | Array of characters to look for. Order doesn't matter. |
startindex | Index to start lookup from. |
int System::String::IndexOfAny | ( | const ArrayPtr< char_t > & | anyOf, |
int32_t | startindex, | ||
int32_t | count | ||
) | const |
Looks for any of passed characters through substring. Compares first string character to all characters in anyOf, then compares second one and so on. Returns index of the first one matching any of the target characters.
anyOf | Array of characters to look for. Order doesn't matter. |
startindex | Index to start lookup from. |
count | Number of characters to look through. |
int System::String::IndexOfAny | ( | const String & | str, |
int | startIndex = 0 |
||
) | const |
Consequently looks for all characters of str in this. If first character is found, its position is returned, otherwise looks for the second one and so on.
str | String of characters to look for. Order of characters matters. |
startIndex | Position to start lookup from. |
Inserts substring at specified position.
startIndex | Index in this string to start inserting from. |
value | Insertion string. |
|
inline |
bool System::String::IsAsciiString | ( | ) | const |
Indicates if a String contains ASCII symbols only.
bool System::String::IsEmpty | ( | ) | const |
Checks if string is both non-null and empty.
bool System::String::IsNormalized | ( | System::Text::NormalizationForm | form | ) | const |
Checks if unicode string is normalized using normalization form specified.
form | Normalization form, see System::Text::NormalizationForm for details. |
|
inline |
bool System::String::IsNullOrEmpty | ( | ) | const |
Checks if string is empty or is considered null.
|
static |
Checks if passed string is null or empty.
str | String to check. |
|
static |
Indicates whether a specified string is null, empty, or consists only of white-space characters.
str | String to check. |
|
static |
Joins array using string as separator.
separator | String to put between array elements when joining them. |
parts | Array of parts to join. |
startIndex | First index in array to start joining from. |
count | Number of array elements to join. -1 means 'until array ends'. |
|
static |
|
static |
Joins array using string as separator.
separator | String to put between array elements when joining them. |
parts | ArrayView of parts to join. |
startIndex | First index in array to start joining from. |
count | Number of array elements to join. -1 means 'until array ends'. |
int System::String::LastIndexOf | ( | char_t | value | ) | const |
Character backward lookup.
value | Character to look for. |
int System::String::LastIndexOf | ( | char_t | value, |
int32_t | startIndex | ||
) | const |
Character backward lookup.
value | Character to look for. |
startIndex | Index to start lookup at. |
int System::String::LastIndexOf | ( | char_t | value, |
int32_t | startIndex, | ||
int32_t | count | ||
) | const |
Character backward lookup.
value | Character to look for. |
startIndex | Index to start lookup at. |
count | Number of characters to look through |
int System::String::LastIndexOf | ( | const String & | str, |
int | startIndex, | ||
System::StringComparison | comparison_type | ||
) | const |
Substring backward lookup.
str | Substring to look for. |
startIndex | Position in source string to start lookup through. |
comparison_type | Comparison mode. |
int System::String::LastIndexOf | ( | const String & | str, |
int | startIndex = INT32_MAX |
||
) | const |
Substring backward lookup.
str | Substring to look for. |
startIndex | Position in source string to start lookup through. |
int System::String::LastIndexOf | ( | const String & | str, |
System::StringComparison | comparison_type | ||
) | const |
Substring backward lookup.
str | Substring to look for. |
comparison_type | Comparison mode. |
int System::String::LastIndexOf | ( | const String & | value, |
int | startIndex, | ||
int | count, | ||
StringComparison | comparisonType | ||
) | const |
Substring backward lookup.
value | Substring to look for. |
startIndex | Position in source string to start lookup through. |
count | Number of characters to look through. |
comparisonType | Comparison mode. |
int System::String::LastIndexOfAny | ( | const ArrayPtr< char_t > & | anyOf | ) | const |
Looks for any of passed characters through whole string backwardly. Compares last string character to all characters in anyOf, then compares previous one and so on. Returns index of the first match found.
anyOf | Array of characters to look for. Order doesn't matter. |
int System::String::LastIndexOfAny | ( | const ArrayPtr< char_t > & | anyOf, |
int32_t | startindex | ||
) | const |
Looks for any of passed characters through substring backwardly. Compares last string character to all characters in anyOf, then compares previous one and so on. Returns index of the first match found.
anyOf | Array of characters to look for. Order doesn't matter. |
startindex | Index to start lookup from. |
int System::String::LastIndexOfAny | ( | const ArrayPtr< char_t > & | anyOf, |
int32_t | startindex, | ||
int32_t | count | ||
) | const |
Looks for any of passed characters through substring backwardly. Compares last string character to all characters in anyOf, then compares previous one and so on. Returns index of the first match found.
anyOf | Array of characters to look for. Order doesn't matter. |
startindex | Index to start lookup from. |
count | Number of characters to look through. |
String System::String::Normalize | ( | System::Text::NormalizationForm | form | ) | const |
Normalizes unicode string using normalization form specified.
form | Normalization form, see System::Text::NormalizationForm for details. |
bool System::String::operator!= | ( | const String & | str | ) | const |
Non-equality comparison operator.
str | String to compare current one to. |
bool System::String::operator!= | ( | std::nullptr_t | ) | const |
Checks if string is not null. Applies same logic as IsNull() call.
String System::String::operator+ | ( | char_t | x | ) | const |
Adds character to the end of the string.
x | Character to add. |
|
inline |
String concatenation with string literal or character string pointer.
T | One of string literal or character string pointer forms. |
arg | Entity to concatenate with current string. |
|
inline |
Adds reference type object string representation to the end of the string.
T | pointer type. |
value | Object to convert to string using ToString() call and to add to current string. |
|
inline |
Adds value type object string representation to the end of the string.
T | Value type to call ToString() upon. |
value | Object to convert to string using ToString() call and to add to current string. |
String System::String::operator+ | ( | double | d | ) | const |
Adds floating point value string representation to the end of the string.
d | Value to convert to string and to add. |
String System::String::operator+ | ( | int | i | ) | const |
Adds integer value string representation to the end of the string.
i | Integer value to convert to string and to add. |
String System::String::operator+ | ( | int64_t | v | ) | const |
Adds integer value string representation to the end of the string.
v | Value to convert to string and to add to add. |
|
inline |
String System::String::operator+ | ( | uint32_t | i | ) | const |
Adds unsigned integer value string representation to the end of the string.
i | Value to convert to string and to add. |
String & System::String::operator+= | ( | char_t | c | ) |
Concatenation assignment operator.
c | Character to add to the end of current string. |
Concatenation assignment operator.
str | String to add to the end of current string. |
String & System::String::operator+= | ( | double | value | ) |
Concatenation assignment operator.
value | Double to add to the end of current string. |
String & System::String::operator+= | ( | int16_t | value | ) |
Concatenation assignment operator.
value | Short to add to the end of current string. |
String & System::String::operator+= | ( | int32_t | value | ) |
Concatenation assignment operator.
value | Int to add to the end of current string. |
String & System::String::operator+= | ( | int64_t | value | ) |
Concatenation assignment operator.
value | Long to add to the end of current string. |
|
inline |
Concatenation assignment operator.
T | Value type to concatenate with string. Must be bool |
value | Boolean to add to the end of current string. |
String & System::String::operator+= | ( | uint16_t | value | ) |
Concatenation assignment operator.
value | Unsigned short to add to the end of current string. |
String & System::String::operator+= | ( | uint32_t | value | ) |
Concatenation assignment operator.
value | Unsigned int to add to the end of current string. |
String & System::String::operator+= | ( | uint64_t | value | ) |
Concatenation assignment operator.
value | Unsigned long to add to the end of current string. |
String & System::String::operator+= | ( | uint8_t | value | ) |
Concatenation assignment operator.
value | Byte to add to the end of current string. |
bool System::String::operator< | ( | const String & | str | ) | const |
Order-compares strings.
str | String to compare current one to. |
bool System::String::operator== | ( | const String & | str | ) | const |
Equality comparison operator.
str | String to compare current one to. |
bool System::String::operator== | ( | std::nullptr_t | ) | const |
Checks if string is null. Applies same logic as IsNull() call.
char_t System::String::operator[] | ( | int | index | ) | const |
Gets character at specified position.
index | Index to get character from. |
String System::String::PadLeft | ( | int | totalWidth, |
char_t | c = u' ' |
||
) | const |
Adds padding on the left of original string.
totalWidth | Number of padding characters to insert. |
c | Padding character. |
String System::String::PadRight | ( | int | totalWidth, |
char_t | c = u' ' |
||
) | const |
Adds padding on the right of original string.
totalWidth | Number of padding characters to insert. |
c | Padding character. |
reverse_iterator System::String::rbegin | ( | ) | const |
Returns reverse iterator to the last character (if any) of actual string buffer.
String System::String::Remove | ( | int32_t | startIndex, |
int32_t | count = INT32_MAX |
||
) | const |
Extracts everything but substring from current string.
startIndex | Index of first character to not extract. |
count | Number of characters to not extract. |
reverse_iterator System::String::rend | ( | ) | const |
Returns reverse iterator to the before first character (if any) of actual string buffer.
String System::String::Replace | ( | char_t | oldValue, |
char_t | newValue | ||
) | const |
Replaces all occurrences of character in the string.
oldValue | Character to replace. |
newValue | replacement value. |
String & System::String::reset | ( | ) |
Sets string to null. Is analogous to 'string_variable_name = null' in C#.
String & System::String::SetCharAt | ( | int | index, |
char_t | ch | ||
) |
Sets character at specified position.
index | Index to set character at. |
ch | Character to put at specified position. |
ArrayPtr< String > System::String::Split | ( | char_t | separator, |
int32_t | count, | ||
StringSplitOptions | opt = StringSplitOptions::None |
||
) | const |
Splits string by character.
separator | Character to split string by. |
count | The maximum number of substrings to return. |
opt | Splitting options. |
ArrayPtr< String > System::String::Split | ( | char_t | separator = u' ' , |
StringSplitOptions | opt = StringSplitOptions::None |
||
) | const |
Splits string by character.
separator | Character to split string by. |
opt | Splitting options. |
ArrayPtr< String > System::String::Split | ( | char_t | separatorA, |
char_t | separatorB, | ||
StringSplitOptions | opt = StringSplitOptions::None |
||
) | const |
Splits string by one of two characters.
separatorA | First character to split string by. |
separatorB | Second character to split string by. |
opt | Splitting options. |
ArrayPtr< String > System::String::Split | ( | const ArrayPtr< char_t > & | separators, |
int32_t | count, | ||
StringSplitOptions | opt = StringSplitOptions::None |
||
) | const |
ArrayPtr< String > System::String::Split | ( | const ArrayPtr< char_t > & | separators, |
StringSplitOptions | opt = StringSplitOptions::None |
||
) | const |
ArrayPtr< String > System::String::Split | ( | const ArrayPtr< String > & | separators, |
int | count, | ||
StringSplitOptions | opt = StringSplitOptions::None |
||
) | const |
ArrayPtr< String > System::String::Split | ( | const ArrayPtr< String > & | separators, |
StringSplitOptions | opt = StringSplitOptions::None |
||
) | const |
ArrayPtr< String > System::String::Split | ( | const String & | separator, |
int | count, | ||
StringSplitOptions | opt = StringSplitOptions::None |
||
) | const |
Splits string by substring.
separator | Substring acting as separator. If empty, whitespace character acts as separator. |
count | Max number of elements in splits array. |
opt | Splitting options. |
ArrayPtr< String > System::String::Split | ( | const String & | separator, |
StringSplitOptions | opt = StringSplitOptions::None |
||
) | const |
Splits string by substring.
separator | Substring acting as separator. If empty, whitespace character acts as separator. |
opt | Splitting options. |
bool System::String::StartsWith | ( | const String & | value | ) | const |
Checks if string begins with specified substring.
value | Lookup string. |
bool System::String::StartsWith | ( | const String & | value, |
bool | ignoreCase, | ||
const SharedPtr< System::Globalization::CultureInfo > & | culture = nullptr |
||
) | const |
Checks if string begins with specified substring.
value | Lookup string. |
ignoreCase | Specifies whether comparison is case-insensitive. |
culture | Culture to use while performing string comparison. |
bool System::String::StartsWith | ( | const String & | value, |
System::StringComparison | comparisonType | ||
) | const |
Checks if string begins with specified substring.
value | Lookup string. |
comparisonType | Comparison mode, see System::StringComparison for details. |
String System::String::Substring | ( | int32_t | startIndex | ) | const |
Extracts substring.
startIndex | Substring start index. |
String System::String::Substring | ( | int32_t | startIndex, |
int32_t | length | ||
) | const |
Extracts substring.
startIndex | Substring start index. |
length | Substring length. |
std::string System::String::ToAsciiString | ( | ) | const |
Converts string to std::string. Uses ASCII encoding.
FormatException | if a string contains non-ASCII characters. |
ArrayPtr< uint8_t > System::String::ToByteArray | ( | int32_t | startIndex = 0 , |
int32_t | length = INT32_MAX , |
||
bool | LE = true |
||
) | const |
Converts string or substring to array of bytes.
startIndex | Substring start index. |
length | Substring length. |
LE | If true, encode characters using little endianness; otherwise, use big endianness. |
ArrayPtr< char_t > System::String::ToCharArray | ( | int32_t | startIndex = 0 , |
int32_t | length = INT32_MAX |
||
) | const |
Converts string or substring to array of characters.
startIndex | Substring start index. |
length | Substring length. |
String System::String::ToLower | ( | ) | const |
Converts all string's characters to lower case.
String System::String::ToLower | ( | const SharedPtr< System::Globalization::CultureInfo > & | cultureInfo | ) | const |
Converts all string's characters to lower case using specific culture.
cultureInfo | Culture to use. |
String System::String::ToLowerInvariant | ( | ) | const |
Converts all string's characters to lower case using invariant culture.
|
inline |
Wrapper for handling String class in contexts where ToString() is being called on value type objects.
|
inline |
Wrapper for handling String class in contexts where ToString() is being called on value type objects.
std::u16string System::String::ToU16Str | ( | ) | const |
Converts string to std::u16string.
std::u32string System::String::ToU32Str | ( | ) | const |
Converts string to std::u32string.
String System::String::ToUpper | ( | ) | const |
Converts all string's characters to upper case.
String System::String::ToUpper | ( | const SharedPtr< System::Globalization::CultureInfo > & | cultureInfo | ) | const |
Converts all string's characters to upper case using specific culture.
cultureInfo | Culture to use. |
String System::String::ToUpperInvariant | ( | ) | const |
Converts all string's characters to upper case using invariant culture.
std::string System::String::ToUtf8String | ( | ) | const |
Converts string to std::string. Uses UTF-8 encoding.
std::wstring System::String::ToWCS | ( | ) | const |
Converts string to std::wstring.
String System::String::Trim | ( | ) | const |
Removes all whitespace characters from both beginning and end of the string.
String System::String::Trim | ( | char_t | ch | ) | const |
Removes all occurrences of passed character from both beginning and end of the string.
ch | Symbol to remove. |
String System::String::TrimEnd | ( | ) | const |
Removes all whitespace characters from end of the string.
String System::String::TrimEnd | ( | char_t | ch | ) | const |
Removes all occurrences of passed character from end of the string.
ch | Symbol to remove. |
String System::String::TrimStart | ( | ) | const |
Removes all whitespace characters from beginning of the string.
String System::String::TrimStart | ( | char_t | ch | ) | const |
Removes all occurrences of passed character from beginning of the string.
ch | Symbol to remove. |
const UChar * System::String::u_str | ( | ) | const |
Returns ICU-styled null-terminated buffer. May reallocate the string.
|
static |
Empty string.
|
protected |
String state. Contains value 0 if string is null, 1 if string is constructed from string literal.
|
mutableprotected |
Actual string value.
|
static |
Null string.