iDRS™ SDK 16
Loading...
Searching...
No Matches
idrs_string_interface.h File Reference

Interface for idrs_string wrapper. More...

Go to the source code of this file.

Functions

idrs_string idrs_string_idrs_Create (idrs_exception *pargException)
 Default constructor.
 
idrs_string idrs_string_idrs_Create2 (const idrs_string argOther, idrs_exception *pargException)
 Copy constructor from another idrs_string.
 
idrs_string idrs_string_idrs_Create3 (utf8_type const *argBuffer, idrs_exception *pargException)
 Constructor from a null terminated char buffer.
 
idrs_string idrs_string_idrs_Create4 (utf8_type const *argBuffer, IDRS_UINT const uiSize, idrs_exception *pargException)
 Constructor from a char buffer and a size.
 
idrs_string idrs_string_idrs_Create5 (utf32_type const *argBuffer, idrs_exception *pargException)
 Constructor from a null terminated wide char buffer.
 
idrs_string idrs_string_idrs_Create6 (utf32_type const *argBuffer, IDRS_UINT const uiSize, idrs_exception *pargException)
 Constructor from a wide char buffer and a size.
 
idrs_string idrs_string_idrs_Create7 (utf16_type const *argBuffer, idrs_exception *pargException)
 Constructor from a null terminated wide char buffer.
 
idrs_string idrs_string_idrs_Create8 (utf16_type const *argBuffer, IDRS_UINT const uiSize, idrs_exception *pargException)
 Constructor from a wide char buffer and a size.
 
idrs_string idrs_string_idrs_Create9 (wchar_t const *argBuffer, idrs_exception *pargException)
 Constructor from a null terminated wide char buffer.
 
idrs_string idrs_string_idrs_Create10 (wchar_t const *argBuffer, IDRS_UINT const uiSize, idrs_exception *pargException)
 Constructor from a wide char buffer and a size.
 
utf8_type const * idrs_string_c_str (const idrs_string argidrs_string, idrs_exception *pargException)
 Returns the non-modifiable array of characters.
 
utf32_type const * idrs_string_utf32_c_str (const idrs_string argidrs_string, idrs_exception *pargException)
 Returns the non-modifiable array of wide characters.
 
utf16_type const * idrs_string_utf16_c_str (const idrs_string argidrs_string, idrs_exception *pargException)
 Returns the non-modifiable array of wide characters.
 
void idrs_string_clear (idrs_string argidrs_string, idrs_exception *pargException)
 Clear the string content.
 
idrs_string idrs_string_assign (idrs_string argidrs_string, const idrs_string argOther, idrs_exception *pargException)
 Assignment operator taking an idrs_string.
 
idrs_string idrs_string_assign2 (idrs_string argidrs_string, char const *argBuffer, idrs_exception *pargException)
 Assignment operator taking a null-terminated buffer of chars.
 
idrs_string idrs_string_assign3 (idrs_string argidrs_string, char const *argBuffer, IDRS_UINT const uiSize, idrs_exception *pargException)
 Assignment operator taking a buffer of chars with a size.
 
idrs_string idrs_string_assign4 (idrs_string argidrs_string, utf32_type const *argBuffer, idrs_exception *pargException)
 Assignment operator taking a null-teminated buffer of wide chars.
 
idrs_string idrs_string_assign5 (idrs_string argidrs_string, utf32_type const *argBuffer, IDRS_UINT const uiSize, idrs_exception *pargException)
 Assignment operator taking a buffer of wide chars and a size.
 
idrs_string idrs_string_assign6 (idrs_string argidrs_string, utf16_type const *argBuffer, idrs_exception *pargException)
 Assignment operator taking a null-teminated buffer of wide chars.
 
idrs_string idrs_string_assign7 (idrs_string argidrs_string, utf16_type *argBuffer, IDRS_UINT const uiSize, idrs_exception *pargException)
 Assignment operator taking a buffer of wide chars and a size.
 
idrs_string idrs_string_assign8 (idrs_string argidrs_string, wchar_t const *argBuffer, idrs_exception *pargException)
 Assignment operator taking a null-teminated buffer of wide chars.
 
idrs_string idrs_string_assign9 (idrs_string argidrs_string, wchar_t *argBuffer, IDRS_UINT const uiSize, idrs_exception *pargException)
 Assignment operator taking a buffer of wide chars and a size.
 
IDRS_UINT idrs_string_utf32_length (const idrs_string argidrs_string, idrs_exception *pargException)
 Returns the string length in its utf-32 representation.
 
IDRS_UINT idrs_string_utf16_length (const idrs_string argidrs_string, idrs_exception *pargException)
 Returns the string length in its utf-16 representation.
 
IDRS_UINT idrs_string_size (const idrs_string argidrs_string, idrs_exception *pargException)
 Returns the string length in its utf-8 representation.
 
IDRS_UINT idrs_string_utf32_size (const idrs_string argidrs_string, idrs_exception *pargException)
 Returns the string length in its utf-32 representation.
 
IDRS_UINT idrs_string_utf16_size (const idrs_string argidrs_string, idrs_exception *pargException)
 Returns the string length in its utf-16 representation.
 
IDRS_BOOL idrs_string_empty (const idrs_string argidrs_string, idrs_exception *pargException)
 Checks wheter the string is empty.
 
IDRS_INT idrs_string_compare (const idrs_string argidrs_string, const idrs_string argOther, idrs_exception *pargException)
 Compares this string to another one.
 
IDRS_BOOL idrs_string_starts_with (const idrs_string argidrs_string, const idrs_string strPrefix, idrs_exception *pargException)
 Checks if this string starts with the given prefix.
 
IDRS_BOOL idrs_string_ends_with (const idrs_string argidrs_string, const idrs_string strSuffix, idrs_exception *pargException)
 Check if this string ends with the given suffix.
 
IDRS_INT idrs_string_find (const idrs_string argidrs_string, const idrs_string strValue, IDRS_INT const iOffset, idrs_exception *pargException)
 Finds the position of the first occurrence of the given substring.
 
IDRS_INT idrs_string_find2 (const idrs_string argidrs_string, const idrs_string strValue, idrs_exception *pargException)
 Finds the position of the first occurrence of the given substring.
 
IDRS_INT idrs_string_rfind (const idrs_string argidrs_string, const idrs_string strValue, IDRS_INT const iOffset, idrs_exception *pargException)
 Finds the position of the last occurrence of the given substring.
 
IDRS_INT idrs_string_rfind2 (const idrs_string argidrs_string, const idrs_string strValue, idrs_exception *pargException)
 Finds the position of the last occurrence of the given substring.
 
idrs_string idrs_string_substr (const idrs_string argidrs_string, IDRS_INT const iPosition, IDRS_INT const iCount, idrs_exception *pargException)
 Returns the specified substring.
 
idrs_string idrs_string_substr2 (const idrs_string argidrs_string, IDRS_INT const iPosition, idrs_exception *pargException)
 Returns the specified substring.
 
idrs_string idrs_string_append (idrs_string argidrs_string, const idrs_string argOther, idrs_exception *pargException)
 Append a string to the end of this string.
 
void idrs_string_Destroy (idrs_string argidrs_string, idrs_exception *pargException)
 Destroys a idrs_string handle.
 

Detailed Description

Interface for idrs_string wrapper.

Function Documentation

◆ idrs_string_append()

idrs_string idrs_string_append ( idrs_string  argidrs_string,
const idrs_string  argOther,
idrs_exception *  pargException 
)

Append a string to the end of this string.

Parameters
argidrs_stringidrs_string handle
argOtherThe string to append
pargExceptionPointer to exception structure that will be filled if an exception occurs
Returns
Reference to this string

◆ idrs_string_assign()

idrs_string idrs_string_assign ( idrs_string  argidrs_string,
const idrs_string  argOther,
idrs_exception *  pargException 
)

Assignment operator taking an idrs_string.

Parameters
argidrs_stringidrs_string handle
argOtherString to assign
pargExceptionPointer to exception structure that will be filled if an exception occurs
Returns
reference to the current string

◆ idrs_string_assign2()

idrs_string idrs_string_assign2 ( idrs_string  argidrs_string,
char const *  argBuffer,
idrs_exception *  pargException 
)

Assignment operator taking a null-terminated buffer of chars.

Parameters
argidrs_stringidrs_string handle
argBufferBuffer containing the utf-8 string to assign
pargExceptionPointer to exception structure that will be filled if an exception occurs
Returns
reference to the current string

◆ idrs_string_assign3()

idrs_string idrs_string_assign3 ( idrs_string  argidrs_string,
char const *  argBuffer,
IDRS_UINT const  uiSize,
idrs_exception *  pargException 
)

Assignment operator taking a buffer of chars with a size.

Parameters
argidrs_stringidrs_string handle
argBufferBuffer containing the utf-8 string to assign
uiSizeSize of the buffer
pargExceptionPointer to exception structure that will be filled if an exception occurs
Returns
reference to the current string

◆ idrs_string_assign4()

idrs_string idrs_string_assign4 ( idrs_string  argidrs_string,
utf32_type const *  argBuffer,
idrs_exception *  pargException 
)

Assignment operator taking a null-teminated buffer of wide chars.

Parameters
argidrs_stringidrs_string handle
argBufferBuffer containing the utf-32 string to assign
pargExceptionPointer to exception structure that will be filled if an exception occurs
Returns
reference to the current string

◆ idrs_string_assign5()

idrs_string idrs_string_assign5 ( idrs_string  argidrs_string,
utf32_type const *  argBuffer,
IDRS_UINT const  uiSize,
idrs_exception *  pargException 
)

Assignment operator taking a buffer of wide chars and a size.

Parameters
argidrs_stringidrs_string handle
argBufferBuffer containing the utf-32 string to assign
uiSizeSize of the buffer
pargExceptionPointer to exception structure that will be filled if an exception occurs
Returns
reference to the current string

◆ idrs_string_assign6()

idrs_string idrs_string_assign6 ( idrs_string  argidrs_string,
utf16_type const *  argBuffer,
idrs_exception *  pargException 
)

Assignment operator taking a null-teminated buffer of wide chars.

Parameters
argidrs_stringidrs_string handle
argBufferBuffer containing the utf-16 string to assign
pargExceptionPointer to exception structure that will be filled if an exception occurs
Returns
reference to the current string

◆ idrs_string_assign7()

idrs_string idrs_string_assign7 ( idrs_string  argidrs_string,
utf16_type *  argBuffer,
IDRS_UINT const  uiSize,
idrs_exception *  pargException 
)

Assignment operator taking a buffer of wide chars and a size.

Parameters
argidrs_stringidrs_string handle
argBufferBuffer containing the utf-16 string to assign
uiSizeSize of the buffer
pargExceptionPointer to exception structure that will be filled if an exception occurs
Returns
reference to the current string

◆ idrs_string_assign8()

idrs_string idrs_string_assign8 ( idrs_string  argidrs_string,
wchar_t const *  argBuffer,
idrs_exception *  pargException 
)

Assignment operator taking a null-teminated buffer of wide chars.

Parameters
argidrs_stringidrs_string handle
argBufferBuffer containing the wide char to assign
pargExceptionPointer to exception structure that will be filled if an exception occurs
Returns
reference to the current string

◆ idrs_string_assign9()

idrs_string idrs_string_assign9 ( idrs_string  argidrs_string,
wchar_t *  argBuffer,
IDRS_UINT const  uiSize,
idrs_exception *  pargException 
)

Assignment operator taking a buffer of wide chars and a size.

Parameters
argidrs_stringidrs_string handle
argBufferBuffer containing the wide char to assign
uiSizeSize of the buffer
pargExceptionPointer to exception structure that will be filled if an exception occurs
Returns
reference to the current string

◆ idrs_string_c_str()

utf8_type const * idrs_string_c_str ( const idrs_string  argidrs_string,
idrs_exception *  pargException 
)

Returns the non-modifiable array of characters.

Returns
Non-modifiable null-terminated utf-8 string.
Parameters
argidrs_stringidrs_string handle
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ idrs_string_clear()

void idrs_string_clear ( idrs_string  argidrs_string,
idrs_exception *  pargException 
)

Clear the string content.

Parameters
argidrs_stringidrs_string handle
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ idrs_string_compare()

IDRS_INT idrs_string_compare ( const idrs_string  argidrs_string,
const idrs_string  argOther,
idrs_exception *  pargException 
)

Compares this string to another one.

Parameters
argidrs_stringidrs_string handle
argOtherOther string to compare to.
pargExceptionPointer to exception structure that will be filled if an exception occurs
Return values
<0 This string appears first in lexicographical order
>0 This string appears second in lexicographical order
0Both strings are equal

◆ idrs_string_Destroy()

void idrs_string_Destroy ( idrs_string  argidrs_string,
idrs_exception *  pargException 
)

Destroys a idrs_string handle.

Parameters
argidrs_stringidrs_string handle to destroy
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ idrs_string_empty()

IDRS_BOOL idrs_string_empty ( const idrs_string  argidrs_string,
idrs_exception *  pargException 
)

Checks wheter the string is empty.

Returns
'IDRS_TRUE' if the string is empty 'IDRS_FALSE' otherwise.
Parameters
argidrs_stringidrs_string handle
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ idrs_string_ends_with()

IDRS_BOOL idrs_string_ends_with ( const idrs_string  argidrs_string,
const idrs_string  strSuffix,
idrs_exception *  pargException 
)

Check if this string ends with the given suffix.

Parameters
argidrs_stringidrs_string handle
strSuffixSuffix to check for
pargExceptionPointer to exception structure that will be filled if an exception occurs
Returns
'IDRS_TRUE' if the suffix is found, 'IDRS_FALSE' otherwise.

◆ idrs_string_find()

IDRS_INT idrs_string_find ( const idrs_string  argidrs_string,
const idrs_string  strValue,
IDRS_INT const  iOffset,
idrs_exception *  pargException 
)

Finds the position of the first occurrence of the given substring.

Parameters
argidrs_stringidrs_string handle
strValueThe value to search for
iOffsetThe index where to start searching
pargExceptionPointer to exception structure that will be filled if an exception occurs
Returns
If found, the index of the substring. idrs_string::npos otherwise.

◆ idrs_string_find2()

IDRS_INT idrs_string_find2 ( const idrs_string  argidrs_string,
const idrs_string  strValue,
idrs_exception *  pargException 
)

Finds the position of the first occurrence of the given substring.

Parameters
argidrs_stringidrs_string handle
strValueThe value to search for
pargExceptionPointer to exception structure that will be filled if an exception occurs
Returns
If found, the index of the substring. idrs_string::npos otherwise.

◆ idrs_string_idrs_Create()

idrs_string idrs_string_idrs_Create ( idrs_exception *  pargException)

Default constructor.

Parameters
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ idrs_string_idrs_Create10()

idrs_string idrs_string_idrs_Create10 ( wchar_t const *  argBuffer,
IDRS_UINT const  uiSize,
idrs_exception *  pargException 
)

Constructor from a wide char buffer and a size.

Parameters
argBufferBuffer containing the string
uiSizeSize of the string to be taken into account
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ idrs_string_idrs_Create2()

idrs_string idrs_string_idrs_Create2 ( const idrs_string  argOther,
idrs_exception *  pargException 
)

Copy constructor from another idrs_string.

Parameters
argOtherString to copy
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ idrs_string_idrs_Create3()

idrs_string idrs_string_idrs_Create3 ( utf8_type const *  argBuffer,
idrs_exception *  pargException 
)

Constructor from a null terminated char buffer.

Parameters
argBufferBuffer containing the string
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ idrs_string_idrs_Create4()

idrs_string idrs_string_idrs_Create4 ( utf8_type const *  argBuffer,
IDRS_UINT const  uiSize,
idrs_exception *  pargException 
)

Constructor from a char buffer and a size.

Parameters
argBufferBuffer containing the string
uiSizeSize of the string to be taken into account
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ idrs_string_idrs_Create5()

idrs_string idrs_string_idrs_Create5 ( utf32_type const *  argBuffer,
idrs_exception *  pargException 
)

Constructor from a null terminated wide char buffer.

Parameters
argBufferBuffer containing the string
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ idrs_string_idrs_Create6()

idrs_string idrs_string_idrs_Create6 ( utf32_type const *  argBuffer,
IDRS_UINT const  uiSize,
idrs_exception *  pargException 
)

Constructor from a wide char buffer and a size.

Parameters
argBufferBuffer containing the string
uiSizeSize of the string to be taken into account
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ idrs_string_idrs_Create7()

idrs_string idrs_string_idrs_Create7 ( utf16_type const *  argBuffer,
idrs_exception *  pargException 
)

Constructor from a null terminated wide char buffer.

Parameters
argBufferBuffer containing the string
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ idrs_string_idrs_Create8()

idrs_string idrs_string_idrs_Create8 ( utf16_type const *  argBuffer,
IDRS_UINT const  uiSize,
idrs_exception *  pargException 
)

Constructor from a wide char buffer and a size.

Parameters
argBufferBuffer containing the string
uiSizeSize of the string to be taken into account
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ idrs_string_idrs_Create9()

idrs_string idrs_string_idrs_Create9 ( wchar_t const *  argBuffer,
idrs_exception *  pargException 
)

Constructor from a null terminated wide char buffer.

Parameters
argBufferBuffer containing the string
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ idrs_string_rfind()

IDRS_INT idrs_string_rfind ( const idrs_string  argidrs_string,
const idrs_string  strValue,
IDRS_INT const  iOffset,
idrs_exception *  pargException 
)

Finds the position of the last occurrence of the given substring.

Parameters
argidrs_stringidrs_string handle
strValueThe value to search for
iOffsetThe index from the start of the string where to start searching
pargExceptionPointer to exception structure that will be filled if an exception occurs
Returns
If found, the index of the substring. idrs_string::npos otherwise.

◆ idrs_string_rfind2()

IDRS_INT idrs_string_rfind2 ( const idrs_string  argidrs_string,
const idrs_string  strValue,
idrs_exception *  pargException 
)

Finds the position of the last occurrence of the given substring.

Parameters
argidrs_stringidrs_string handle
strValueThe value to search for
pargExceptionPointer to exception structure that will be filled if an exception occurs
Returns
If found, the index of the substring. idrs_string::npos otherwise.

◆ idrs_string_size()

IDRS_UINT idrs_string_size ( const idrs_string  argidrs_string,
idrs_exception *  pargException 
)

Returns the string length in its utf-8 representation.

Returns
length of the string in its utf-8 representation
Parameters
argidrs_stringidrs_string handle
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ idrs_string_starts_with()

IDRS_BOOL idrs_string_starts_with ( const idrs_string  argidrs_string,
const idrs_string  strPrefix,
idrs_exception *  pargException 
)

Checks if this string starts with the given prefix.

Parameters
argidrs_stringidrs_string handle
strPrefixPrefix to check for
pargExceptionPointer to exception structure that will be filled if an exception occurs
Returns
'IDRS_TRUE' if the prefix is found, 'IDRS_FALSE' otherwise.

◆ idrs_string_substr()

idrs_string idrs_string_substr ( const idrs_string  argidrs_string,
IDRS_INT const  iPosition,
IDRS_INT const  iCount,
idrs_exception *  pargException 
)

Returns the specified substring.

Parameters
argidrs_stringidrs_string handle
iPositionPosition of the first character to be taken
iCountLength of the substring, or idrs_string::npos to get all remaining chars
pargExceptionPointer to exception structure that will be filled if an exception occurs
Returns
A new string containing the extracted substring.

◆ idrs_string_substr2()

idrs_string idrs_string_substr2 ( const idrs_string  argidrs_string,
IDRS_INT const  iPosition,
idrs_exception *  pargException 
)

Returns the specified substring.

Parameters
argidrs_stringidrs_string handle
iPositionPosition of the first character to be taken
pargExceptionPointer to exception structure that will be filled if an exception occurs
Returns
A new string containing the extracted substring.

◆ idrs_string_utf16_c_str()

utf16_type const * idrs_string_utf16_c_str ( const idrs_string  argidrs_string,
idrs_exception *  pargException 
)

Returns the non-modifiable array of wide characters.

Returns
Non-modifiable null-terminated utf-16 string.
Parameters
argidrs_stringidrs_string handle
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ idrs_string_utf16_length()

IDRS_UINT idrs_string_utf16_length ( const idrs_string  argidrs_string,
idrs_exception *  pargException 
)

Returns the string length in its utf-16 representation.

Returns
length of the string in its utf-16 representation
Parameters
argidrs_stringidrs_string handle
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ idrs_string_utf16_size()

IDRS_UINT idrs_string_utf16_size ( const idrs_string  argidrs_string,
idrs_exception *  pargException 
)

Returns the string length in its utf-16 representation.

Returns
length of the string in utf-16
Parameters
argidrs_stringidrs_string handle
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ idrs_string_utf32_c_str()

utf32_type const * idrs_string_utf32_c_str ( const idrs_string  argidrs_string,
idrs_exception *  pargException 
)

Returns the non-modifiable array of wide characters.

Returns
Non-modifiable null-terminated utf-32 string.
Parameters
argidrs_stringidrs_string handle
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ idrs_string_utf32_length()

IDRS_UINT idrs_string_utf32_length ( const idrs_string  argidrs_string,
idrs_exception *  pargException 
)

Returns the string length in its utf-32 representation.

Returns
length of the string in its utf-32 representation
Parameters
argidrs_stringidrs_string handle
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ idrs_string_utf32_size()

IDRS_UINT idrs_string_utf32_size ( const idrs_string  argidrs_string,
idrs_exception *  pargException 
)

Returns the string length in its utf-32 representation.

Returns
length of the string in utf-32
Parameters
argidrs_stringidrs_string handle
pargExceptionPointer to exception structure that will be filled if an exception occurs