Public Member Functions | Public Attributes | List of all members
crown::DynamicString Struct Reference

Dynamic array of characters. More...

#include <dynamic_string.h>

Public Member Functions

 DynamicString (Allocator &a)
 
DynamicStringoperator= (const DynamicString &ds)
 
DynamicStringoperator= (const char *str)
 
DynamicStringoperator= (const char c)
 
DynamicStringoperator= (const FixedString &fs)
 
void set (const char *str, u32 len)
 Sets the string to str.
 
void reserve (u32 n)
 Reserves space for at least n characters.
 
u32 length () const
 Returns the length of the string.
 
bool empty () const
 Returns whether the string is empty.
 
void ltrim ()
 Removes leading white-space characters from the string.
 
void rtrim ()
 Removes trailing white-space characters from the string.
 
void trim ()
 Removes leading and trailing white-space characters from the string.
 
bool has_prefix (const char *str) const
 Returns whether the string starts with str.
 
bool has_suffix (const char *str) const
 Returns wheterh the string ends with str.
 
StringId32 to_string_id () const
 Returns the StringId32 of the string.
 
const char * c_str () const
 Returns the string as a NULL-terminated string.
 

Public Attributes

 ALLOCATOR_AWARE
 
Array< char > _data
 

Detailed Description

Dynamic array of characters.


The documentation for this struct was generated from the following file: