GigaPasjans
Loading...
Searching...
No Matches
String Class Reference

Represents a mutable sequence of characters, providing various member functions for string manipulation, comparison, and conversion. More...

#include <String.h>

Public Member Functions

 String ()
 Initializes a new instance of the String class.
 
 String (const std::string &data)
 Initializes a new instance of the String class.
 
 String (const char *data)
 Initializes a new instance of the String class.
 
 String (const char *data, const int32 length)
 Initializes a new instance of the String class.
 
 String (const char *start, const char *end)
 Initializes a new instance of the String class.
 
 String (char c)
 Initializes a new instance of the String class.
 
 String (const String &str)
 Initializes a new instance of the String class.
 
 String (String &&str) noexcept
 
Stringoperator= (const String &str)
 
Stringoperator= (String &&str) noexcept
 
bool operator== (const String &str) const
 
String operator+ (const char *str) const
 
String operator+ (const String &str) const
 
void Set (char *data, int32 length)
 Sets an array of characters to the string.
 
void Allocate (int32 length)
 Use only when string is empty.
 
FORCE_INLINE char * Get () const
 Gets a raw char sequence.
 
FORCE_INLINE int32 GetLength () const
 
bool StartsWith (const String &other) const
 
bool EndsWith (const String &other) const
 
int32 HashCode () const
 

Detailed Description

Represents a mutable sequence of characters, providing various member functions for string manipulation, comparison, and conversion.

Constructor & Destructor Documentation

◆ String() [1/2]

String::String ( const std::string & data)
inline

Initializes a new instance of the String class.

Parameters
data

◆ String() [2/2]

String::String ( const char * data)
inline

Initializes a new instance of the String class.

Parameters
data

Member Function Documentation

◆ Allocate()

void String::Allocate ( int32 length)

Use only when string is empty.

Parameters
length

◆ Get()

FORCE_INLINE char * String::Get ( ) const
inlinenodiscard

Gets a raw char sequence.

Returns

◆ Set()

void String::Set ( char * data,
int32 length )

Sets an array of characters to the string.

Parameters
dataThe pointer to the start of an array of characters to set (UTF-8). This array need not be null-terminated, and null characters are not treated specially.
lengthThe number of characters to assign.

The documentation for this class was generated from the following files: