B2BITS FIX Antenna C++ 2.33.0
|
Represents ASCII std::string. More...
#include <B2BITS_String.h>
Public Types | |
typedef BasicString< value_type > | MyT |
typedef CharType | value_type |
Provides access to the template parameter. | |
Public Types inherited from Engine::MemBlock< CharType > | |
typedef CharType | value_type |
Provides access to the template parameter. | |
Public Member Functions | |
BasicString () throw () | |
Default constructor. | |
BasicString (const value_type *aData, size_t aSize) throw () | |
Constructor Constructs instance from address to memory and size. | |
template<typename Iterator > | |
BasicString (Iterator aBegin, Iterator aEnd) throw () | |
Constructor Constructs instance from address to memory and size. | |
BasicString (std::basic_string< CharType > const &str) throw () | |
Constructor Constructs instance from std::basic_string. | |
BasicString (value_type const *aData) throw () | |
Constructor Constructs instance from ANSI std::string. | |
int | compareTo (BasicString rv) const throw () |
bool | equals (BasicString rv) const throw () |
template<typename S > | |
size_t | find (const S &sub, size_t pos=0) const |
Find a given substring in the string. | |
size_t | find (const value_type *sub, size_t pos, size_t count) const |
Find a given substring in the string. | |
V12_API size_t | find (const value_type *sub, size_t pos=0) const |
Find a given substring in the string. | |
size_t | find (value_type val, size_t pos=0) const |
Search a given character in the string. | |
bool | isEmpty () const throw () |
Returns true if given string is empty (e.g. size equal to 0) | |
bool | isNull () const throw () |
Returns true if given string is NULL. | |
MyT | normalize () const throw () |
Calculates size of string and returns new object of BasicString. | |
BasicString | substr (std::size_t offset, std::size_t size) const throw () |
Returns part of the string by given offset and size. | |
V12_API int | toInt () const throw () |
Converts string value to int. | |
V12_API System::i16 | toInt16 () const throw () |
Converts string value to int. | |
V12_API System::i32 | toInt32 () const throw () |
Converts string value to int. | |
V12_API System::i64 | toInt64 () const throw () |
Converts string value to int. | |
std::basic_string< value_type > | toStdString () const |
Converts AsciiString to std::string. | |
std::basic_string< value_type > | toString () const |
Converts AsciiString to std::string This method creates copy of the stored buffer and returns it as std::string. | |
V12_API unsigned int | toUInt () const throw () |
Converts string value to int. | |
V12_API System::u16 | toUInt16 () const throw () |
Converts string value to int. | |
V12_API System::u32 | toUInt32 () const throw () |
Converts string value to int. | |
V12_API System::u64 | toUInt64 () const throw () |
Converts string value to int. | |
Public Member Functions inherited from Engine::MemBlock< CharType > | |
value_type const * | begin () const throw () |
Returns pointer to first character. | |
int | compareTo (MemBlock rv) const throw () |
Compares two MemBlock. | |
value_type const * | data () const throw () |
Returns pointer to the first character of the block. | |
value_type const * | end () const throw () |
Returns pointer to the next after last character. | |
MemBlock () throw () | |
Default constructor. | |
MemBlock (const value_type *aData, size_t aSize) throw () | |
Constructor Constructs instance from address to memory and size. | |
MemBlock (Iterator aBegin, Iterator aEnd) throw () | |
Constructor Constructs instance from address to memory and size. | |
value_type const & | operator[] (std::size_t index) const throw () |
Indexer. | |
std::size_t | size () const throw () |
Returns size of the block. | |
Static Public Member Functions | |
template<int N> | |
static MyT | fromStr (value_type const (&aData)[N]) throw () |
Creates instance from array of char. | |
Represents ASCII std::string.
typedef BasicString<value_type> Engine::BasicString< CharType >::MyT |
typedef CharType Engine::BasicString< CharType >::value_type |
Provides access to the template parameter.
|
inline |
Default constructor.
Referenced by Engine::BasicString< CharType >::substr().
|
inline |
Constructor Constructs instance from address to memory and size.
aData | address to the block |
aSize | size of the block |
|
inline |
Constructor Constructs instance from address to memory and size.
aBegin | address to the first byte of the block |
aEnd | address of the byte after last byte of the block |
|
inline |
Constructor Constructs instance from std::basic_string.
str | Source std::string |
|
inline |
Constructor Constructs instance from ANSI std::string.
aData | address to the ASCII std::string |
|
inline |
References Engine::MemBlock< T >::compareTo().
Referenced by Engine::BasicString< CharType >::equals(), and Engine::operator<().
|
inline |
References Engine::BasicString< CharType >::compareTo().
|
inline |
Find a given substring in the string.
sub | substring to look for |
pos | position where the search starts |
References Engine::BasicString< CharType >::find().
|
inline |
Find a given substring in the string.
sub | substring to look for as a raw pointer |
pos | position where the search starts |
count | length of the substring to look for |
References Engine::MemBlock< CharType >::data(), and Engine::MemBlock< CharType >::size().
V12_API size_t Engine::BasicString< CharType >::find | ( | const value_type * | sub, |
size_t | pos = 0 ) const |
Find a given substring in the string.
sub | substring to look for as a null terminated character array |
pos | position where the search starts |
|
inline |
Search a given character in the string.
val | value to find |
pos | position to start the search |
References Engine::MemBlock< CharType >::data(), and Engine::MemBlock< CharType >::size().
Referenced by Engine::BasicString< CharType >::find().
|
inlinestatic |
Creates instance from array of char.
aData | Array of chars |
|
inline |
Returns true if given string is empty (e.g. size equal to 0)
References Engine::MemBlock< CharType >::data(), and Engine::MemBlock< CharType >::size().
|
inline |
Returns true if given string is NULL.
References Engine::MemBlock< CharType >::data().
|
inline |
Calculates size of string and returns new object of BasicString.
References Engine::MemBlock< CharType >::data(), and Engine::MemBlock< CharType >::size().
|
inline |
Returns part of the string by given offset and size.
References Engine::BasicString< CharType >::BasicString(), Engine::MemBlock< CharType >::data(), and Engine::MemBlock< CharType >::size().
V12_API int Engine::BasicString< CharType >::toInt | ( | ) | const | |||
throw | ( | ) |
Converts string value to int.
V12_API System::i16 Engine::BasicString< CharType >::toInt16 | ( | ) | const | |||
throw | ( | ) |
Converts string value to int.
V12_API System::i32 Engine::BasicString< CharType >::toInt32 | ( | ) | const | |||
throw | ( | ) |
Converts string value to int.
V12_API System::i64 Engine::BasicString< CharType >::toInt64 | ( | ) | const | |||
throw | ( | ) |
Converts string value to int.
|
inline |
Converts AsciiString to std::string.
This method creates copy of the stored buffer and returns it as std::string.
References Engine::MemBlock< CharType >::data(), and Engine::MemBlock< CharType >::size().
|
inline |
Converts AsciiString to std::string This method creates copy of the stored buffer and returns it as std::string.
References Engine::MemBlock< CharType >::data(), and Engine::MemBlock< CharType >::size().
V12_API unsigned int Engine::BasicString< CharType >::toUInt | ( | ) | const | |||
throw | ( | ) |
Converts string value to int.
V12_API System::u16 Engine::BasicString< CharType >::toUInt16 | ( | ) | const | |||
throw | ( | ) |
Converts string value to int.
V12_API System::u32 Engine::BasicString< CharType >::toUInt32 | ( | ) | const | |||
throw | ( | ) |
Converts string value to int.
V12_API System::u64 Engine::BasicString< CharType >::toUInt64 | ( | ) | const | |||
throw | ( | ) |
Converts string value to int.