Inherits System::Object.
Public Member Functions | |
ASPOSECPP_SHARED_API | StringBuilder () |
Constructor. More... | |
ASPOSECPP_SHARED_API | StringBuilder (int capacity) |
ASPOSECPP_SHARED_API | StringBuilder (const String &str) |
ASPOSECPP_SHARED_API | StringBuilder (const String &value, int capacity) |
ASPOSECPP_SHARED_API | StringBuilder (const String &value, int startIndex, int length, int capacity) |
ASPOSECPP_SHARED_API | ~StringBuilder () |
Destructor. More... | |
ASPOSECPP_SHARED_API int | get_Length () const |
ASPOSECPP_SHARED_API void | set_Length (int len) |
ASPOSECPP_SHARED_API int | get_Capacity () const |
ASPOSECPP_SHARED_API void | set_Capacity (int capacity) |
ASPOSECPP_SHARED_API char_t | operator[] (int index) const |
ASPOSECPP_SHARED_API char_t | idx_get (int index) const |
ASPOSECPP_SHARED_API void | idx_set (int index, char_t c) |
ASPOSECPP_SHARED_API StringBuilder * | Append (char_t c) |
ASPOSECPP_SHARED_API StringBuilder * | Append (char_t c, int count) |
ASPOSECPP_SHARED_API StringBuilder * | Append (const ArrayPtr< char_t > &arr) |
ASPOSECPP_SHARED_API StringBuilder * | Append (const ArrayPtr< char_t > &arr, int startIndex, int charCount) |
ASPOSECPP_SHARED_API StringBuilder * | Append (const String &str) |
ASPOSECPP_SHARED_API StringBuilder * | Append (const String &str, int startIndex, int charCount) |
template<class T > | |
StringBuilder * | Append (const SharedPtr< T > &obj) |
ASPOSECPP_SHARED_API StringBuilder * | Append (const SharedPtr< StringBuilder > &builder) |
ASPOSECPP_SHARED_API StringBuilder * | Append (float f) |
ASPOSECPP_SHARED_API StringBuilder * | Append (double df) |
ASPOSECPP_SHARED_API StringBuilder * | Append (int i) |
template<typename T > | |
std::enable_if< std::is_arithmetic< T >::value, StringBuilder * >::type | Append (T value) |
template<class E > | |
std::enable_if< std::is_enum< E >::value, StringBuilder * >::type | Append (E e) |
template<class... TArgs> | |
StringBuilder * | AppendFormat (const String &format, const TArgs &... args) |
template<class... TArgs> | |
StringBuilder * | AppendFormat (const SharedPtr< IFormatProvider > &fp, const String &format, const TArgs &... args) |
ASPOSECPP_SHARED_API StringBuilder * | AppendLine () |
ASPOSECPP_SHARED_API StringBuilder * | AppendLine (const String &str) |
ASPOSECPP_SHARED_API StringBuilder * | Clear () |
ASPOSECPP_SHARED_API StringBuilder * | Insert (int startIndex, const String &str) |
ASPOSECPP_SHARED_API StringBuilder * | Insert (int32_t index, const String &value, int32_t count) |
ASPOSECPP_SHARED_API StringBuilder * | Insert (int startIndex, char_t ch) |
ASPOSECPP_SHARED_API StringBuilder * | Insert (int index, const System::ArrayPtr< char_t > &chars, int startIndex, int charCount) |
template<typename T > | |
std::enable_if< std::is_arithmetic< T >::value, StringBuilder * >::type | Insert (int startIndex, T value) |
ASPOSECPP_SHARED_API StringBuilder * | Replace (const String &oldString, const String &newString) |
ASPOSECPP_SHARED_API StringBuilder * | Replace (const String &oldString, const String &newString, int position, int count) |
ASPOSECPP_SHARED_API StringBuilder * | Replace (char_t oldChar, char_t newChar) |
ASPOSECPP_SHARED_API StringBuilder * | Replace (char_t oldChar, char_t newChar, int startIndex, int count) |
ASPOSECPP_SHARED_API StringBuilder * | Remove (int startIndex, int length) |
ASPOSECPP_SHARED_API String | ToString () const override |
ASPOSECPP_SHARED_API String | ToString (int startIndex, int length) const |
ASPOSECPP_SHARED_API void | CopyTo (int sourceIndex, System::ArrayPtr< char_t > const &destination, int destinationIndex, int count) |
Public Member Functions inherited from System::Object | |
ASPOSECPP_SHARED_API | Object () |
Creates object. Initializes all internal data structures. More... | |
virtual ASPOSECPP_SHARED_API | ~Object () |
Destroys object. Frees all internal data structures. More... | |
ASPOSECPP_SHARED_API | Object (Object const &x) |
Copy constructor. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More... | |
Object & | operator= (Object const &x) |
Assignment operator. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More... | |
Object * | SharedRefAdded () |
Increments shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More... | |
int | SharedRefRemovedSafe () |
Decrements and returns shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More... | |
int | RemovedSharedRefs (int count) |
Decreases shared reference count by specified value. More... | |
Detail::SmartPtrCounter * | WeakRefAdded () |
Increments weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More... | |
void | WeakRefRemoved () |
Decrements weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More... | |
Detail::SmartPtrCounter * | GetCounter () |
Gets reference counter data structure associated with the object. More... | |
int | SharedCount () const |
Gets current value of shared reference counter. More... | |
ASPOSECPP_SHARED_API void | Lock () |
Implements C# lock() statement locking. Call directly or use LockContext sentry object. More... | |
ASPOSECPP_SHARED_API void | Unlock () |
Implements C# lock() statement unlocking. Call directly or use LockContext sentry object. More... | |
virtual ASPOSECPP_SHARED_API bool | Equals (ptr obj) |
Compares objects using C# Object.Equals semantics. More... | |
virtual ASPOSECPP_SHARED_API int32_t | GetHashCode () const |
Analog of C# Object.GetHashCode() method. Enables hashing of custom objects. More... | |
virtual ASPOSECPP_SHARED_API ptr | MemberwiseClone () const |
Analog of C# Object.MemberwiseClone() method. Enables cloning custom types. More... | |
virtual ASPOSECPP_SHARED_API const TypeInfo & | GetType () const |
Gets actual type of object. Analog of C# System.Object.GetType() call. More... | |
virtual ASPOSECPP_SHARED_API bool | Is (const TypeInfo &targetType) const |
Check if object represents an instance of type described by targetType. Analog of C# 'is' operator. More... | |
virtual ASPOSECPP_SHARED_API void | SetTemplateWeakPtr (uint32_t argument) |
Set n'th template argument a weak pointer (rather than shared). Allows switching pointers in containers to weak mode. More... | |
virtual ASPOSECPP_SHARED_API bool | FastCast (const Details::FastRttiBase &helper, void **out_ptr) const |
For internal purposes only. More... | |
template<> | |
bool | Equals (float const &objA, float const &objB) |
template<> | |
bool | Equals (double const &objA, double const &objB) |
template<> | |
bool | ReferenceEquals (String const &str, std::nullptr_t) |
template<> | |
bool | ReferenceEquals (String const &str1, String const &str2) |
Additional Inherited Members | |
Public Types inherited from System::Object | |
typedef SmartPtr< Object > | ptr |
Alias for smart pointer type. More... | |
Static Public Member Functions inherited from System::Object | |
static bool | ReferenceEquals (ptr const &objA, ptr const &objB) |
Compares objects by reference. More... | |
template<typename T > | |
static std::enable_if<!IsSmartPtr< T >::value, bool >::type | ReferenceEquals (T const &objA, T const &objB) |
Compares objects by reference. More... | |
template<typename T > | |
static std::enable_if<!IsSmartPtr< T >::value, bool >::type | ReferenceEquals (T const &objA, std::nullptr_t) |
Reference-compares value type object with nullptr. More... | |
template<typename T1 , typename T2 > | |
static std::enable_if< IsSmartPtr< T1 >::value &&IsSmartPtr< T2 >::value, bool >::type | Equals (T1 const &objA, T2 const &objB) |
Compares reference type objects in C# style. More... | |
template<typename T1 , typename T2 > | |
static std::enable_if<!IsSmartPtr< T1 >::value &&!IsSmartPtr< T2 >::value, bool >::type | Equals (T1 const &objA, T2 const &objB) |
Compares value type objects in C# style. More... | |
static const TypeInfo & | Type () |
Implements C# typeof(System.Object) construct. More... | |
Buffer to accumulate string part by part. This type can be allocated either in stack as value type or in heap using System::MakeObject() function. Once the object is allocated, never mix up these two usecases: having SmartPtr pointers onto stack-allocated objects is strictly prohibited.
ASPOSECPP_SHARED_API System::Text::StringBuilder::StringBuilder | ( | ) |
Constructor.
ASPOSECPP_SHARED_API System::Text::StringBuilder::StringBuilder | ( | int | capacity | ) |
Constructor.
capacity | Initial string capacity. |
ASPOSECPP_SHARED_API System::Text::StringBuilder::StringBuilder | ( | const String & | str | ) |
Constructor.
str | Initial value. |
ASPOSECPP_SHARED_API System::Text::StringBuilder::StringBuilder | ( | const String & | value, |
int | capacity | ||
) |
Constructor.
value | Initial value. |
capacity | Initial string capacity. |
ASPOSECPP_SHARED_API System::Text::StringBuilder::StringBuilder | ( | const String & | value, |
int | startIndex, | ||
int | length, | ||
int | capacity | ||
) |
Constructor.
value | Initial value. |
startIndex | Index of initial value slice beginning. |
length | Initial value slice length. |
capacity | Initial string capacity. |
ASPOSECPP_SHARED_API System::Text::StringBuilder::~StringBuilder | ( | ) |
Destructor.
ASPOSECPP_SHARED_API StringBuilder* System::Text::StringBuilder::Append | ( | char_t | c | ) |
Adds character to builder.
c | Character value. |
ASPOSECPP_SHARED_API StringBuilder* System::Text::StringBuilder::Append | ( | char_t | c, |
int | count | ||
) |
Adds characters to builder.
c | Character value. |
count | How many times to repeat insertee character. |
ASPOSECPP_SHARED_API StringBuilder* System::Text::StringBuilder::Append | ( | const ArrayPtr< char_t > & | arr | ) |
Adds characters array to builder.
arr | Characters to add. |
ASPOSECPP_SHARED_API StringBuilder* System::Text::StringBuilder::Append | ( | const ArrayPtr< char_t > & | arr, |
int | startIndex, | ||
int | charCount | ||
) |
Adds characters array slice to builder.
arr | Characters to add. |
startIndex | Slice beginning index. |
charCount | Slice length. |
ASPOSECPP_SHARED_API StringBuilder* System::Text::StringBuilder::Append | ( | const String & | str | ) |
ASPOSECPP_SHARED_API StringBuilder* System::Text::StringBuilder::Append | ( | const String & | str, |
int | startIndex, | ||
int | charCount | ||
) |
Adds string slice to builder.
str | String to add. |
startIndex | Slice beginning index. |
charCount | Slice length. |
|
inline |
ASPOSECPP_SHARED_API StringBuilder* System::Text::StringBuilder::Append | ( | const SharedPtr< StringBuilder > & | builder | ) |
Adds builder's content to builder.
builder | Builder to add content from. |
ASPOSECPP_SHARED_API StringBuilder* System::Text::StringBuilder::Append | ( | float | f | ) |
Adds floating point value to builder.
f | Value to serialize and add. |
ASPOSECPP_SHARED_API StringBuilder* System::Text::StringBuilder::Append | ( | double | df | ) |
Adds floating point value to builder.
df | Value to serialize and add. |
ASPOSECPP_SHARED_API StringBuilder* System::Text::StringBuilder::Append | ( | int | i | ) |
Adds integer value to builder.
i | Value to serialize and add. |
|
inline |
Adds arithmetic value to builder.
T | Arithmetic type. |
value | Value to serialize and add. |
|
inline |
Adds enum value string representation to builder.
E | Enum type. |
e | Value to serialize and add. |
|
inline |
Appends formated string to builder.
TArgs | Arguments type. |
format | Format string. |
args | Arguments to insert into format string positions. |
|
inline |
Appends formated string to builder.
TArgs | Arguments type. |
fp | Format provider; ignored. |
format | Format string. |
args | Arguments to insert into format string positions. |
ASPOSECPP_SHARED_API StringBuilder* System::Text::StringBuilder::AppendLine | ( | ) |
Appends new line character to builder.
ASPOSECPP_SHARED_API StringBuilder* System::Text::StringBuilder::AppendLine | ( | const String & | str | ) |
Appends string followed by new line character to builder.
str | String to add. |
ASPOSECPP_SHARED_API StringBuilder* System::Text::StringBuilder::Clear | ( | ) |
Removes all characters from the builder.
ASPOSECPP_SHARED_API void System::Text::StringBuilder::CopyTo | ( | int | sourceIndex, |
System::ArrayPtr< char_t > const & | destination, | ||
int | destinationIndex, | ||
int | count | ||
) |
Copies builder's data into existing array positions.
sourceIndex | Index in builder to start copying from. |
destination | Destination array. |
destinationIndex | Index in destination array to start insertion at. |
count | Number of characters to copy. |
ASPOSECPP_SHARED_API int System::Text::StringBuilder::get_Capacity | ( | ) | const |
Gets current capacity of string builder.
ASPOSECPP_SHARED_API int System::Text::StringBuilder::get_Length | ( | ) | const |
Gets length of string currently in builder.
ASPOSECPP_SHARED_API char_t System::Text::StringBuilder::idx_get | ( | int | index | ) | const |
Gets character at specified position.
index | Position in builder. |
ASPOSECPP_SHARED_API void System::Text::StringBuilder::idx_set | ( | int | index, |
char_t | c | ||
) |
Sets character at specified position.
index | Position in builder. |
c | Character to set. |
ASPOSECPP_SHARED_API StringBuilder* System::Text::StringBuilder::Insert | ( | int | startIndex, |
const String & | str | ||
) |
Inserts string into builder's fixed position.
startIndex | Position to insert characters into. |
str | String to insert. |
ASPOSECPP_SHARED_API StringBuilder* System::Text::StringBuilder::Insert | ( | int32_t | index, |
const String & | value, | ||
int32_t | count | ||
) |
Inserts repeated string into builder's fixed position.
index | Position to insert characters into. |
value | String to insert. |
count | How many times to repeat value string. |
ASPOSECPP_SHARED_API StringBuilder* System::Text::StringBuilder::Insert | ( | int | startIndex, |
char_t | ch | ||
) |
Inserts character into builder's fixed position.
startIndex | Position to insert characters into. |
ch | Character to insert. |
ASPOSECPP_SHARED_API StringBuilder* System::Text::StringBuilder::Insert | ( | int | index, |
const System::ArrayPtr< char_t > & | chars, | ||
int | startIndex, | ||
int | charCount | ||
) |
|
inline |
Inserts value into builder's fixed position.
Parameter | type. |
startIndex | Position to insert characters into. |
value | Value to format and insert. |
ASPOSECPP_SHARED_API char_t System::Text::StringBuilder::operator[] | ( | int | index | ) | const |
Gets character at specified position.
index | Position in builder. |
ASPOSECPP_SHARED_API StringBuilder* System::Text::StringBuilder::Remove | ( | int | startIndex, |
int | length | ||
) |
Removes fragment from builder.
startIndex | Deletion range beginning index. |
length | Number of characters to remove. |
ASPOSECPP_SHARED_API StringBuilder* System::Text::StringBuilder::Replace | ( | const String & | oldString, |
const String & | newString | ||
) |
Replaces substring through the builder.
oldString | String to replace. |
newString | Replacement string. |
ASPOSECPP_SHARED_API StringBuilder* System::Text::StringBuilder::Replace | ( | const String & | oldString, |
const String & | newString, | ||
int | position, | ||
int | count | ||
) |
Replaces substring through the builder's range.
oldString | String to replace. |
newString | Replacement string. |
position | Builder's replacement range beginning position. |
count | Builder's replacement range length. |
ASPOSECPP_SHARED_API StringBuilder* System::Text::StringBuilder::Replace | ( | char_t | oldChar, |
char_t | newChar | ||
) |
Replaces character through the builder.
oldChar | Character to replace. |
newChar | Replacement character. |
ASPOSECPP_SHARED_API StringBuilder* System::Text::StringBuilder::Replace | ( | char_t | oldChar, |
char_t | newChar, | ||
int | startIndex, | ||
int | count | ||
) |
Replaces character through the builder's range.
oldChar | Character to replace. |
newChar | Replacement character. |
startIndex | Builder's replacement range beginning position. |
count | Builder's replacement range length. |
ASPOSECPP_SHARED_API void System::Text::StringBuilder::set_Capacity | ( | int | capacity | ) |
Sets current capacity of string builder.
capacity | Maximum number of characters that can be contained in the memory allocated by the current instance. |
ASPOSECPP_SHARED_API void System::Text::StringBuilder::set_Length | ( | int | len | ) |
Trunkates or extends string builder to specified length.
len | Length to set. |
|
overridevirtual |
Gets string currently contained in builder.
Reimplemented from System::Object.
ASPOSECPP_SHARED_API String System::Text::StringBuilder::ToString | ( | int | startIndex, |
int | length | ||
) | const |
Gets substring currently contained in builder.
startIndex | Extraction range beginning index. |
length | Number of characters to extract. |