API Documentation
Loading...
Searching...
No Matches
String Class Reference

#include <String.h>

Inheritance diagram for String:
[legend]
Collaboration diagram for String:
[legend]

Public Member Functions

NDEVR_BASE_API String ()
 
NDEVR_BASE_API String (const String &string)
 
NDEVR_BASE_API String (String &&string) noexcept
 
template<std::size_t N>
 String (const char(&string)[N])
 
template<std::size_t N>
 String (const wchar(&string)[N])
 
 String (const char *string)
 
NDEVR_BASE_API String (const char *const string, uint04 size)
 
 String (uint04 size, const char &value)
 
template<class t_type >
 String (const t_type &value)
 
NDEVR_BASE_API bool beginsWith (const String &s, bool ignore_case=false) const
 
NDEVR_BASE_API bool endsWith (const String &s, bool ignore_case=false) const
 
NDEVR_BASE_API uint04 indexOf (const String &sub_string, bool ignore_case=false, uint04 start_index=0) const
 
NDEVR_BASE_API uint04 indexOf (const char &sub_string) const
 
NDEVR_BASE_API uint04 indexOf (const char &sub_string, uint04 start_pos) const
 
NDEVR_BASE_API uint04 indexOf (const char &sub_string, uint04 start_pos, uint04 size) const
 
NDEVR_BASE_API uint04 indexOf (const char *sub_string, bool ignore_case=false, uint04 start_index=0) const
 
NDEVR_BASE_API uint04 indexOf (const char *sub_string, bool ignore_case, uint04 start_index, uint04 size) const
 
NDEVR_BASE_API uint04 indexOf (const char *sub_string, char escape_char, bool ignore_case=false, uint04 start_index=0) const
 
NDEVR_BASE_API uint04 lastIndexOf (const char *sub_string, bool ignore_case=false) const
 
NDEVR_BASE_API uint04 lastIndexOf (const char value, bool ignore_case=false) const
 
NDEVR_BASE_API bool hasSubString (const String &sub_string, bool ignore_case=false) const
 
NDEVR_BASE_API bool hasSubString (const char *sub_string, bool ignore_case=false) const
 
NDEVR_BASE_API Stringreplace (const String &sub_string, const String &replace_sub_string, bool ignore_case=false)
 
NDEVR_BASE_API Stringreplace (const Buffer< String, uint04, ObjectAllocator< false > > &sub_string, const Buffer< String, uint04, ObjectAllocator< false > > &replace_sub_string, bool ignore_case=false)
 
NDEVR_BASE_API Buffer< String, uint04, ObjectAllocator< false > > splitString (char delimiter, bool preserve_empty=true) const
 
NDEVR_BASE_API Buffer< String, uint04, ObjectAllocator< false > > splitString (const Buffer< char > &delimiter, bool preserve_empty=true) const
 
NDEVR_BASE_API void splitString (char delimiter, Buffer< String, uint04, ObjectAllocator< false > > &strings, bool preserve_empty=true) const
 
NDEVR_BASE_API void splitString (const Buffer< char > &delimiter, Buffer< String, uint04, ObjectAllocator< false > > &strings, bool preserve_empty=true) const
 
NDEVR_BASE_API Buffer< String, uint04, ObjectAllocator< false > > splitStringLength (uint04 max_chars_per_line) const
 
NDEVR_BASE_API Buffer< String, uint04, ObjectAllocator< false > > splitStringLength (fltp04 length, fltp04(&font_width)[256]) const
 
NDEVR_BASE_API const char * c_str () const
 
NDEVR_BASE_API bool isSameNoCase (const String &s) const
 
NDEVR_BASE_API bool matchesWildcard (const String &pattern) const
 
NDEVR_BASE_API Stringappend (const String &string)
 
NDEVR_BASE_API uint08 hash () const
 
NDEVR_BASE_API uint08 hashUpper () const
 
NDEVR_BASE_API uint08 hashLower () const
 
 operator uint08 () const
 
 operator uint04 () const
 
size_t operator() () const
 
NDEVR_BASE_API String substr (uint04 start) const
 
NDEVR_BASE_API String substr (uint04 start, uint04 end) const
 
NDEVR_BASE_API StringtrimWhiteSpace ()
 
NDEVR_BASE_API StringaddWhiteSpace (uint04 desired_string_size, uint04 desired_right_alignment_location=0, char whitespace=' ')
 
NDEVR_BASE_API StringformatNumberString (uint04 decimals)
 
NDEVR_BASE_API StringformatNumberString (bool add_comma, uint04 decimals)
 
NDEVR_BASE_API StringformatNumberString (bool add_comma, uint04 min_decimals, uint04 max_decimals, uint04 min_digits, char decimal='.', char comma=',')
 
NDEVR_BASE_API String formatTitleString () const
 
NDEVR_BASE_API StringremoveNonAlphaNumeric (bool remove_tab=true, bool remove_space=true, bool remove_new_line=true, bool remove_r=true, bool remove_numbers=false)
 
NDEVR_BASE_API StringremoveNonNumeric ()
 
NDEVR_BASE_API String shortenString (uint04 size) const
 
NDEVR_BASE_API String insertNewLines (uint04 max_line_size) const
 
NDEVR_BASE_API String predictNextStringIncrement () const
 
NDEVR_BASE_API String toUpper () const
 
NDEVR_BASE_API String toLower () const
 
NDEVR_BASE_API bool isNumeric () const
 
NDEVR_BASE_API uint04 fromHex () const
 
NDEVR_BASE_API void addUnicodeAsUTF8 (const wchar *unicode)
 
NDEVR_BASE_API bool addUnicodeCharAsUTF8 (const wchar *unicode, uint04 &advance)
 
void addWChar (const wchar &object)
 
Stringoperator= (const String &value)
 
Stringoperator= (String &&value) noexcept
 
bool operator== (const String &value) const
 
bool operator== (const char *const value) const
 
template<std::size_t t_size>
bool operator== (const char(&string)[t_size])
 
bool operator!= (const char *const value) const
 
template<std::size_t t_size>
bool operator!= (const char(&string)[t_size])
 
bool operator!= (const String &value) const
 
template<class t_type >
t_type getAs () const
 
NDEVR_BASE_API bool operator< (const String &value) const
 
NDEVR_BASE_API bool operator> (const String &value) const
 
- Public Member Functions inherited from Buffer< char, uint04, ObjectAllocator< true >, BufferAllocator< char, uint04, true > >
constexpr Buffer ()
 
constexpr Buffer (const Buffer &buffer)
 
constexpr Buffer (Buffer &&buffer) noexcept
 
 Buffer (uint04 size)
 
 Buffer (const char *buffer, uint04 size)
 
 Buffer (uint04 size, const char &fill_object)
 
 Buffer (std::initializer_list< char > l)
 
 Buffer (const t_iterator &begin, const t_iterator &end)
 
 ~Buffer ()
 
 operator const char * () const
 
 operator char * ()
 
Buffer< t_other_type, t_other_index_type, t_other_memory_allocator, t_other_memory_manager > getAs () const
 
void add (char &&object)
 
void add (const char &object)
 
void add (uint04 location, const char &object)
 
void add (uint04 location, char &&object)
 
void addAll (const Buffer< char, t_other_index_type, t_other_memory_allocator, t_other_memory_manager > &buffer)
 
void addAll (const char *buffer, uint04 buffer_size)
 
void addAll (const char *buffer)
 
void insert (uint04 offset, const Buffer &buffer)
 
void insert (uint04 offset, const char *const buffer, uint04 buffer_size)
 
void insert (const uint04 location, const char *buffer)
 
void replaceIndexRange (uint04 offset, uint04 replace_size, const Buffer &buffer)
 
void addSpace (uint04 space_to_add)
 
void addSpace (uint04 location, uint04 size)
 
void addAndFillSpace (uint04 space_to_add, const char &fill_object)
 
decltype(auto) ptr ()
 
decltype(auto) ptr () const
 
uint04 memSize () const
 
decltype(auto) begin ()
 
decltype(auto) begin () const
 
decltype(auto) begin (uint04 index) const
 
uint04 capacity () const
 
void clear ()
 
void clear (uint04 new_capacity)
 
sint04 compare (const Buffer &value) const
 
sint04 compare (const Buffer &value, uint04 start, uint04 end) const
 
bool contains (const char &element) const
 
bool contains (const char &element, const std::function< bool(const char &, const char &)> &equal_function) const
 
bool contains (const char &element, uint04 start) const
 
bool contains (const char &element, uint04 start, uint04 search_size) const
 
uint04 count (const char &element) const
 
decltype(auto) end ()
 
decltype(auto) end () const
 
decltype(auto) end (uint04 index)
 
void ensureCapacity (uint04 new_capacity, bool ensure_not_greater=false, bool ensure_not_less=true)
 
bool equals (const Buffer &buffer) const
 
decltype(auto) get (uint04 index)
 
decltype(auto) get (uint04 index) const
 
Buffer getAll (uint04 start, uint04 size)
 
uint04 indexOf (const char &element) const
 
uint04 indexOf (const char &element, uint04 start_pos) const
 
uint04 indexOf (const char &element, uint04 start_pos, uint04 search_size) const
 
bool isEmpty () const
 
decltype(auto) last ()
 
decltype(auto) last () const
 
uint04 lastIndexOf (const char &element) const
 
void removeIndex (uint04 location)
 
void removeIndexBackSwap (uint04 location)
 
bool removeElement (const char &element)
 
void removeLast ()
 
void removeAllUnordered (const char &object)
 
void removeAllUnordered (const t_functor &functor)
 
void removeAllOrdered (const char &object)
 
void removeAllIndex (uint04 start, uint04 end)
 
void removeAllIndices (const t_range_buffer &ranges)
 
void replaceAll (const char &var, const char &replacement)
 
void reverse ()
 
void reverse (const uint04 start, const uint04 end)
 
void setAll (const t_o_type *src, uint04 offset, uint04 size)
 
void setAll (const Buffer &buffer, uint04 offset, uint04 size)
 
void setAll (const Buffer &buffer, uint04 offset, uint04 other_offset, uint04 size)
 
void setAllToValue (const t_o_type &fill_element, const uint04 offset=0, uint04 fill_size=Constant< uint04 >::NaN)
 
void setSize (uint04 new_size)
 
void setSize (const uint04 new_size, const char &fill_element)
 
void resize (uint04 new_size)
 
constexpr uint04 size () const
 
void swapElements (const char &element1, const char &element2)
 
void swapAllElements (const char &element1, const char &element2)
 
void swapIndices (uint04 index_1, uint04 index_2)
 
void move (uint04 from, uint04 to)
 
void primitiveSort ()
 
void sort ()
 
void sortRange (uint04 start, uint04 end)
 
void setUnique ()
 
void setUniquePresorted ()
 
uint04 sortAboutValue (uint04 value_index)
 
uint04 sortAboutValue (uint04 value_index, uint04 start, uint04 end)
 
Bufferoperator= (const Buffer &buffer)
 
Bufferoperator= (Buffer &&buffer) noexcept
 
bool operator== (const Buffer &buffer) const
 
bool operator> (const Buffer &buffer) const
 
bool operator< (const Buffer &buffer) const
 
bool operator>= (const Buffer &buffer) const
 
bool operator<= (const Buffer &buffer) const
 
bool operator!= (const Buffer &buffer) const
 
decltype(auto) operator[] (const uint04 index)
 
decltype(auto) operator[] (const int index)
 
decltype(auto) operator[] (const uint04 value) const
 
decltype(auto) operator[] (const int index) const
 
Buffer operator+ (const char &element) const
 
Buffer operator+ (const Buffer &value) const
 
const Bufferoperator+= (const char &element)
 
Bufferoperator+= (const Buffer &value)
 
bool isSorted () const
 
bool isSortedSet () const
 
constexpr BufferAllocator< char, uint04, true > & memoryInterface ()
 
constexpr const BufferAllocator< char, uint04, true > & memoryInterface () const
 

Static Public Member Functions

static NDEVR_BASE_API bool AlphaNumericCompare (const String &left, const String &right)
 
template<class t_type >
static TranslatedString DisplayString (const t_type &value)
 
static constexpr uint04 str_len (const char *value)
 
static constexpr uint04 str_len (const wchar *value)
 
static constexpr uint08 hash (const char *value)
 
static NDEVR_BASE_API bool IsWhiteSpace (char s)
 
static NDEVR_BASE_API String NumberString (fltp08 value, bool add_comma, uint04 min_decimals, uint04 max_decimals, uint04 min_digits, char decimal='.', char comma=',')
 
static NDEVR_BASE_API String ConvertToCharString (uint04 number)
 
static NDEVR_BASE_API String toHex (uint01 value)
 
static NDEVR_BASE_API String toHex (char value)
 
static NDEVR_BASE_API wchar UTF8toUnicode (const char *utf8, uint04 &advance)
 
static NDEVR_BASE_API String UnicodetoUTF8 (const wchar *unicode, uint04 &advance)
 
template<class t_object >
static std::enable_if< ObjectInfo< t_object >::Integer, String >::type toHex (t_object value)
 
template<class t_object , class t_allocator , class t_buff >
static String toHex (const Buffer< t_object, t_allocator, t_buff > &values)
 
static String toHex (const String &values)
 
template<uint01 t_size, class t_type >
static String toHex (const Vector< t_size, t_type > &values)
 
- Static Public Member Functions inherited from Buffer< char, uint04, ObjectAllocator< true >, BufferAllocator< char, uint04, true > >
static constexpr char Type ()
 

Additional Inherited Members

- Protected Member Functions inherited from Buffer< char, uint04, ObjectAllocator< true >, BufferAllocator< char, uint04, true > >
bool _equals (const Buffer &buffer) const
 
- Protected Attributes inherited from Buffer< char, uint04, ObjectAllocator< true >, BufferAllocator< char, uint04, true > >
BufferAllocator< char, uint04, true > m_memory_interface
 

Constructor & Destructor Documentation

◆ String() [1/9]

String ( )

◆ String() [2/9]

String ( const String & string)

◆ String() [3/9]

String ( String && string)
noexcept

◆ String() [4/9]

template<std::size_t N>
String ( const char(&) string[N])
inline

◆ String() [5/9]

template<std::size_t N>
String ( const wchar(&) string[N])
inline

◆ String() [6/9]

String ( const char * string)
inline

◆ String() [7/9]

String ( const char *const string,
uint04 size )

◆ String() [8/9]

String ( uint04 size,
const char & value )
inline

◆ String() [9/9]

template<class t_type >
String ( const t_type & value)
inlineexplicit

Member Function Documentation

◆ addUnicodeAsUTF8()

NDEVR_BASE_API void addUnicodeAsUTF8 ( const wchar * unicode)

◆ addUnicodeCharAsUTF8()

bool addUnicodeCharAsUTF8 ( const wchar * unicode,
uint04 & advance )

◆ addWChar()

void addWChar ( const wchar & object)

◆ addWhiteSpace()

String & addWhiteSpace ( uint04 desired_string_size,
uint04 desired_right_alignment_location = 0,
char whitespace = ' ' )

◆ AlphaNumericCompare()

bool AlphaNumericCompare ( const String & left,
const String & right )
static

◆ append()

String & append ( const String & string)

◆ beginsWith()

bool beginsWith ( const String & s,
bool ignore_case = false ) const

◆ c_str()

const char * c_str ( ) const

◆ ConvertToCharString()

String ConvertToCharString ( uint04 number)
static

◆ DisplayString()

template<class t_type >
TranslatedString DisplayString ( const t_type & value)
static

◆ endsWith()

bool endsWith ( const String & s,
bool ignore_case = false ) const

◆ formatNumberString() [1/3]

String & formatNumberString ( bool add_comma,
uint04 decimals )

◆ formatNumberString() [2/3]

String & formatNumberString ( bool add_comma,
uint04 min_decimals,
uint04 max_decimals,
uint04 min_digits,
char decimal = '.',
char comma = ',' )

◆ formatNumberString() [3/3]

String & formatNumberString ( uint04 decimals)

◆ formatTitleString()

String formatTitleString ( ) const

◆ fromHex()

uint04 fromHex ( ) const

◆ getAs()

template<class t_type >
t_type getAs ( ) const
inline

◆ hash() [1/2]

uint08 hash ( ) const

◆ hash() [2/2]

static constexpr uint08 hash ( const char * value)
inlinestaticconstexpr

◆ hashLower()

uint08 hashLower ( ) const

◆ hashUpper()

uint08 hashUpper ( ) const

◆ hasSubString() [1/2]

bool hasSubString ( const char * sub_string,
bool ignore_case = false ) const

◆ hasSubString() [2/2]

bool hasSubString ( const String & sub_string,
bool ignore_case = false ) const

◆ indexOf() [1/7]

NDEVR_BASE_API uint04 indexOf ( const char & sub_string) const
inline

◆ indexOf() [2/7]

NDEVR_BASE_API uint04 indexOf ( const char & sub_string,
uint04 start_pos ) const
inline

◆ indexOf() [3/7]

NDEVR_BASE_API uint04 indexOf ( const char & sub_string,
uint04 start_pos,
uint04 size ) const
inline

◆ indexOf() [4/7]

uint04 indexOf ( const char * sub_string,
bool ignore_case,
uint04 start_index,
uint04 size ) const

◆ indexOf() [5/7]

uint04 indexOf ( const char * sub_string,
bool ignore_case = false,
uint04 start_index = 0 ) const

◆ indexOf() [6/7]

uint04 indexOf ( const char * sub_string,
char escape_char,
bool ignore_case = false,
uint04 start_index = 0 ) const

◆ indexOf() [7/7]

uint04 indexOf ( const String & sub_string,
bool ignore_case = false,
uint04 start_index = 0 ) const

◆ insertNewLines()

String insertNewLines ( uint04 max_line_size) const

◆ isNumeric()

bool isNumeric ( ) const

◆ isSameNoCase()

bool isSameNoCase ( const String & s) const

◆ IsWhiteSpace()

bool IsWhiteSpace ( char s)
static

◆ lastIndexOf() [1/2]

uint04 lastIndexOf ( const char * sub_string,
bool ignore_case = false ) const

◆ lastIndexOf() [2/2]

uint04 lastIndexOf ( const char value,
bool ignore_case = false ) const

◆ matchesWildcard()

bool matchesWildcard ( const String & pattern) const

◆ NumberString()

String NumberString ( fltp08 value,
bool add_comma,
uint04 min_decimals,
uint04 max_decimals,
uint04 min_digits,
char decimal = '.',
char comma = ',' )
static

◆ operator uint04()

operator uint04 ( ) const
inline

◆ operator uint08()

operator uint08 ( ) const
inline

◆ operator!=() [1/3]

bool operator!= ( const char *const value) const
inline

◆ operator!=() [2/3]

template<std::size_t t_size>
bool operator!= ( const char(&) string[t_size])
inline

◆ operator!=() [3/3]

bool operator!= ( const String & value) const
inline

◆ operator()()

size_t operator() ( ) const
inline

◆ operator<()

bool operator< ( const String & value) const

◆ operator=() [1/2]

String & operator= ( const String & value)
inline

◆ operator=() [2/2]

String & operator= ( String && value)
inlinenoexcept

◆ operator==() [1/3]

bool operator== ( const char *const value) const
inline

◆ operator==() [2/3]

template<std::size_t t_size>
bool operator== ( const char(&) string[t_size])
inline

◆ operator==() [3/3]

bool operator== ( const String & value) const
inline

◆ operator>()

bool operator> ( const String & value) const

◆ predictNextStringIncrement()

String predictNextStringIncrement ( ) const

◆ removeNonAlphaNumeric()

String & removeNonAlphaNumeric ( bool remove_tab = true,
bool remove_space = true,
bool remove_new_line = true,
bool remove_r = true,
bool remove_numbers = false )

◆ removeNonNumeric()

String & removeNonNumeric ( )

◆ replace() [1/2]

String & replace ( const Buffer< String, uint04, ObjectAllocator< false > > & sub_string,
const Buffer< String, uint04, ObjectAllocator< false > > & replace_sub_string,
bool ignore_case = false )

◆ replace() [2/2]

String & replace ( const String & sub_string,
const String & replace_sub_string,
bool ignore_case = false )

◆ shortenString()

String shortenString ( uint04 size) const

◆ splitString() [1/4]

Buffer< String > splitString ( char delimiter,
bool preserve_empty = true ) const

◆ splitString() [2/4]

NDEVR_BASE_API void splitString ( char delimiter,
Buffer< String, uint04, ObjectAllocator< false > > & strings,
bool preserve_empty = true ) const

◆ splitString() [3/4]

Buffer< String, uint04, ObjectAllocator< false > > splitString ( const Buffer< char > & delimiter,
bool preserve_empty = true ) const

◆ splitString() [4/4]

void splitString ( const Buffer< char > & delimiter,
Buffer< String, uint04, ObjectAllocator< false > > & strings,
bool preserve_empty = true ) const

◆ splitStringLength() [1/2]

Buffer< String > splitStringLength ( fltp04 length,
fltp04(&) font_width[256] ) const

◆ splitStringLength() [2/2]

Buffer< String > splitStringLength ( uint04 max_chars_per_line) const

◆ str_len() [1/2]

static constexpr uint04 str_len ( const char * value)
inlinestaticconstexpr

◆ str_len() [2/2]

static constexpr uint04 str_len ( const wchar * value)
inlinestaticconstexpr

◆ substr() [1/2]

String substr ( uint04 start) const

◆ substr() [2/2]

String substr ( uint04 start,
uint04 end ) const

◆ toHex() [1/6]

String toHex ( char value)
static

◆ toHex() [2/6]

template<class t_object , class t_allocator , class t_buff >
static String toHex ( const Buffer< t_object, t_allocator, t_buff > & values)
inlinestatic

◆ toHex() [3/6]

static String toHex ( const String & values)
inlinestatic

◆ toHex() [4/6]

template<uint01 t_size, class t_type >
static String toHex ( const Vector< t_size, t_type > & values)
inlinestatic

◆ toHex() [5/6]

template<class t_object >
static std::enable_if< ObjectInfo< t_object >::Integer, String >::type toHex ( t_object value)
inlinestatic

◆ toHex() [6/6]

String toHex ( uint01 value)
static

◆ toLower()

String toLower ( ) const

◆ toUpper()

String toUpper ( ) const

◆ trimWhiteSpace()

String & trimWhiteSpace ( )

◆ UnicodetoUTF8()

String UnicodetoUTF8 ( const wchar * unicode,
uint04 & advance )
static

◆ UTF8toUnicode()

wchar UTF8toUnicode ( const char * utf8,
uint04 & advance )
static

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