EmaString class is a container of a null terminated Ascii character string.
More...
The following code snippet shows simple usage of EmaString;
Int32 position = myString.find(
"DE" );
position = myString.find("XYZ");
...
EmaString temp = myString.substr( 3, 4 )
...
myString.append( (
Int32 ) 4 );
std::cout << myString << endl;
...
int Int32
represents 32-bit signed integer
Definition at line 56 of file EmaString.h.
◆ EmaString() [1/3]
refinitiv::ema::access::EmaString::EmaString |
( |
| ) |
|
◆ EmaString() [2/3]
Copy constructor.
- Exceptions
-
- Parameters
-
[in] | str | pointer to the memory containing copied in character string |
[in] | length | specifies number of characters to copy |
◆ EmaString() [3/3]
refinitiv::ema::access::EmaString::EmaString |
( |
const EmaString & |
other | ) |
|
Copy constructor.
- Parameters
-
◆ ~EmaString()
virtual refinitiv::ema::access::EmaString::~EmaString |
( |
| ) |
|
|
virtual |
◆ append() [1/8]
EmaString& refinitiv::ema::access::EmaString::append |
( |
const char * |
value | ) |
|
Append method. Appends string representation of passed in const char*
- Exceptions
-
- Parameters
-
[in] | value | to be appended to this object |
- Returns
- reference to this object
◆ append() [2/8]
Append method. Appends string representation of passed in EmaString
- Exceptions
-
- Parameters
-
[in] | value | to be appended to this object |
- Returns
- reference to this object
◆ append() [3/8]
EmaString& refinitiv::ema::access::EmaString::append |
( |
double |
value | ) |
|
Append method. Appends string representation of passed in double
- Exceptions
-
- Parameters
-
[in] | value | to be appended to this object |
- Returns
- reference to this object
◆ append() [4/8]
EmaString& refinitiv::ema::access::EmaString::append |
( |
float |
value | ) |
|
Append method. Appends string representation of passed in float
- Exceptions
-
- Parameters
-
[in] | value | to be appended to this object |
- Returns
- reference to this object
◆ append() [5/8]
Append method. Appends string representation of passed in Int32
- Exceptions
-
- Parameters
-
[in] | value | to be appended to this object |
- Returns
- reference to this object
◆ append() [6/8]
Append method. Appends string representation of passed in Int64
- Exceptions
-
- Parameters
-
[in] | value | to be appended to this object |
- Returns
- reference to this object
◆ append() [7/8]
Append method. Appends string representation of passed in UInt32
- Exceptions
-
- Parameters
-
[in] | value | to be appended to this object |
- Returns
- reference to this object
◆ append() [8/8]
Append method. Appends string representation of passed in UInt64
- Exceptions
-
- Parameters
-
[in] | value | to be appended to this object |
- Returns
- reference to this object
◆ c_str()
virtual const char* refinitiv::ema::access::EmaString::c_str |
( |
| ) |
const |
|
virtual |
method to get pointer to internal null terminated string of characters
- Returns
- const char pointer used for printing out content of the internal string to screen
◆ caseInsensitiveCompare() [1/2]
bool refinitiv::ema::access::EmaString::caseInsensitiveCompare |
( |
const char * |
str | ) |
const |
Case insensitive comparison operator
- Parameters
-
[in] | str | specifies null terminated string to match against this object |
- Returns
- true if this object and passed in match; false otherwise
◆ caseInsensitiveCompare() [2/2]
bool refinitiv::ema::access::EmaString::caseInsensitiveCompare |
( |
const EmaString & |
str | ) |
const |
Case insensitive comparison operator
- Parameters
-
[in] | str | specifies string to match against this object |
- Returns
- true if this object and passed in match; false otherwise
◆ clear()
EmaString& refinitiv::ema::access::EmaString::clear |
( |
| ) |
|
Clears the contained string.
- Returns
- reference to this object
◆ empty()
bool refinitiv::ema::access::EmaString::empty |
( |
| ) |
const |
check if EmaString is empty
- Returns
- true if string is empty; false otherwise
◆ find() [1/2]
Int32 refinitiv::ema::access::EmaString::find |
( |
const char * |
str, |
|
|
Int32 |
index = 0 |
|
) |
| const |
Method to find occurrence of the passed in string.
- Parameters
-
[in] | str | specifies looked up null terminated string of characters |
[in] | index | specifies position to start the search from |
- Returns
- position where matching string starts; if not found -1
◆ find() [2/2]
Method to find occurrence of the passed in string.
- Parameters
-
[in] | str | specifies looked up string |
[in] | index | specifies position to start the search from |
- Returns
- position where matching string starts; if not found -1
◆ findLast() [1/2]
Int32 refinitiv::ema::access::EmaString::findLast |
( |
const char * |
| ) |
const |
Method to find occurrence of the passed in string from the end
- Parameters
-
[in] | str | specifies looked up null terminated string of characters |
- Returns
- position where matching string starts; if not found -1
◆ findLast() [2/2]
Int32 refinitiv::ema::access::EmaString::findLast |
( |
const EmaString & |
str | ) |
const |
Method to find occurrence of the passed in string starting from the end
- Parameters
-
[in] | str | specifies looked up string |
- Returns
- position where matching string starts; if not found -1
◆ length()
UInt32 refinitiv::ema::access::EmaString::length |
( |
| ) |
const |
Returns length of the contained string. Null termination is not counted in.
- Returns
- length
◆ operator const char *()
refinitiv::ema::access::EmaString::operator const char * |
( |
| ) |
const |
Conversion operator to const char*
- Returns
- const char pointer used for printing out content of the internal string to screen
◆ operator!=() [1/2]
bool refinitiv::ema::access::EmaString::operator!= |
( |
const char * |
str | ) |
const |
Compare operator
- Parameters
-
[in] | str | specifies null terminated string to match against this object |
- Returns
- true if this object and passed in do not match; false otherwise
◆ operator!=() [2/2]
bool refinitiv::ema::access::EmaString::operator!= |
( |
const EmaString & |
str | ) |
const |
Compare operator
- Parameters
-
[in] | str | specifies string to match against this object |
- Returns
- true if this object and passed in do not match; false otherwise
◆ operator+() [1/2]
EmaString refinitiv::ema::access::EmaString::operator+ |
( |
const char * |
str | ) |
const |
Addition operator. Allows a = b + c;
- Exceptions
-
- Parameters
-
[in] | str | specifies char string to be added to this EmaString |
- Returns
- result of addition
◆ operator+() [2/2]
Addition operator. Allows a = b + c;
- Exceptions
-
- Parameters
-
- Returns
- result of addition
◆ operator+=() [1/8]
EmaString& refinitiv::ema::access::EmaString::operator+= |
( |
const char * |
value | ) |
|
Append operator. Appends string representation of passed in const char*
- Exceptions
-
- Parameters
-
[in] | value | to be appended to this object |
- Returns
- reference to this object
◆ operator+=() [2/8]
Append operator. Appends string representation of passed in EmaString
- Exceptions
-
- Parameters
-
[in] | value | to be appended to this object |
- Returns
- reference to this object
◆ operator+=() [3/8]
EmaString& refinitiv::ema::access::EmaString::operator+= |
( |
double |
value | ) |
|
Append operator. Appends string representation of passed in double
- Exceptions
-
- Parameters
-
[in] | value | to be appended to this object |
- Returns
- reference to this object
◆ operator+=() [4/8]
EmaString& refinitiv::ema::access::EmaString::operator+= |
( |
float |
value | ) |
|
Append operator. Appends string representation of passed in float
- Exceptions
-
- Parameters
-
[in] | value | to be appended to this object |
- Returns
- reference to this object
◆ operator+=() [5/8]
EmaString& refinitiv::ema::access::EmaString::operator+= |
( |
Int32 |
value | ) |
|
Append operator. Appends string representation of passed in Int32
- Exceptions
-
- Parameters
-
[in] | value | to be appended to this object |
- Returns
- reference to this object
◆ operator+=() [6/8]
EmaString& refinitiv::ema::access::EmaString::operator+= |
( |
Int64 |
value | ) |
|
Append operator. Appends string representation of passed in Int64
- Exceptions
-
- Parameters
-
[in] | value | to be appended to this object |
- Returns
- reference to this object
◆ operator+=() [7/8]
Append operator. Appends string representation of passed in UInt32
- Exceptions
-
- Parameters
-
[in] | value | to be appended to this object |
- Returns
- reference to this object
◆ operator+=() [8/8]
Append operator. Appends string representation of passed in UInt64
- Exceptions
-
- Parameters
-
[in] | value | to be appended to this object |
- Returns
- reference to this object
◆ operator<() [1/2]
bool refinitiv::ema::access::EmaString::operator< |
( |
const char * |
str | ) |
const |
Compare operator
- Parameters
-
[in] | str | specifies null terminated string to match against this object |
- Returns
- true if this object is less than the passed in; false otherwise
◆ operator<() [2/2]
bool refinitiv::ema::access::EmaString::operator< |
( |
const EmaString & |
str | ) |
const |
Compare operator
- Parameters
-
[in] | str | specifies string to match against this object |
- Returns
- true if this object is less than the passed in; false otherwise
◆ operator<=() [1/2]
bool refinitiv::ema::access::EmaString::operator<= |
( |
const char * |
str | ) |
const |
Compare operator
- Parameters
-
[in] | str | specifies null terminated string to match against this object |
- Returns
- true if this object is less than or equal the passed in; false otherwise
◆ operator<=() [2/2]
bool refinitiv::ema::access::EmaString::operator<= |
( |
const EmaString & |
str | ) |
const |
Compare operator
- Parameters
-
[in] | str | specifies string to match against this object |
- Returns
- true if this object is less than or equal to the passed in; false otherwise
◆ operator=() [1/2]
EmaString& refinitiv::ema::access::EmaString::operator= |
( |
const char * |
other | ) |
|
Assignment operator
- Exceptions
-
- Parameters
-
[in] | other | copied in character string |
- Returns
- reference to this object
◆ operator=() [2/2]
Assignment operator
- Exceptions
-
- Parameters
-
- Returns
- reference to this object
◆ operator==() [1/2]
bool refinitiv::ema::access::EmaString::operator== |
( |
const char * |
str | ) |
const |
Compare operator
- Parameters
-
[in] | str | specifies null terminated string to match against this object |
- Returns
- true if this object and passed in match; false otherwise
◆ operator==() [2/2]
bool refinitiv::ema::access::EmaString::operator== |
( |
const EmaString & |
str | ) |
const |
Compare operator
- Parameters
-
[in] | str | specifies string to match against this object |
- Returns
- true if this object and passed in match; false otherwise
◆ operator>() [1/2]
bool refinitiv::ema::access::EmaString::operator> |
( |
const char * |
str | ) |
const |
Compare operator
- Parameters
-
[in] | str | specifies null terminated string to match against this object |
- Returns
- true if this object is greater than the passed in; false otherwise
◆ operator>() [2/2]
bool refinitiv::ema::access::EmaString::operator> |
( |
const EmaString & |
str | ) |
const |
Compare operator
- Parameters
-
[in] | str | specifies string to match against this object |
- Returns
- true if this object is greater than the passed in; false otherwise
◆ operator>=() [1/2]
bool refinitiv::ema::access::EmaString::operator>= |
( |
const char * |
str | ) |
const |
Compare operator
- Parameters
-
[in] | str | specifies null terminated string to match against this object |
- Returns
- true if this object is greater than or equal to the passed in; false otherwise
◆ operator>=() [2/2]
bool refinitiv::ema::access::EmaString::operator>= |
( |
const EmaString & |
str | ) |
const |
Compare operator
- Parameters
-
[in] | str | specifies string to match against this object |
- Returns
- true if this object is greater than or equal to the passed in; false otherwise
◆ operator[]() [1/2]
char& refinitiv::ema::access::EmaString::operator[] |
( |
UInt32 |
index | ) |
|
read write index operator
- Exceptions
-
- Parameters
-
[in] | index | specifies position of a character to be read |
- Returns
- reference to character at the specified position
◆ operator[]() [2/2]
char refinitiv::ema::access::EmaString::operator[] |
( |
UInt32 |
index | ) |
const |
read only index operator
- Exceptions
-
- Parameters
-
[in] | index | specifies position of a character to be read |
- Returns
- character at the specified position
◆ secureClear()
EmaString& refinitiv::ema::access::EmaString::secureClear |
( |
| ) |
|
Clears the contained string, zeroing out all allocated memory.
- Returns
- reference to this object
◆ set()
Set method. This method copies "length" number of characters from the "str" pointer.
- Exceptions
-
- Parameters
-
[in] | str | pointer to the memory containing copied in character string |
[in] | length | specifies number of characters to copy |
- Returns
- reference to this object
◆ substr()
sub string operator
- Exceptions
-
- Parameters
-
[in] | index | specifies starting position of the sub string |
[in] | length | specifies length of the sub string |
- Returns
- copy of sub string
◆ trimWhitespace()
EmaString& refinitiv::ema::access::EmaString::trimWhitespace |
( |
| ) |
|
removes white spaces from the front and back of the string.
- Returns
- reference to this object
◆ npos
const UInt32 refinitiv::ema::access::EmaString::npos = -1 |
|
static |
npos. Represents the greatest possible value of type unsigned int
Definition at line 64 of file EmaString.h.