iDRS™ SDK 16
Loading...
Searching...
No Matches
idrs_string_interface.h
Go to the documentation of this file.
1
7#ifndef IDRS_STRING_INTERFACE_H
8
9#define IDRS_STRING_INTERFACE_H
10
11#include "idrsstd_interface.h"
12
13#include "idrs_common.h"
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
19/*
20 * Types definitions
21 */
22typedef char utf8_type;
23
24typedef utf8_type* const utf8_reference;
25
26typedef const utf8_type* const const_utf8_reference;
27
28typedef unsigned int utf32_type;
29
30typedef utf32_type* const utf32_reference;
31
32typedef const utf32_type* const const_utf32_reference;
33
34typedef unsigned short utf16_type;
35
36typedef utf16_type* const utf16_reference;
37
38typedef const utf16_type* const const_utf16_reference;
39
44idrs_string idrs_string_idrs_Create(idrs_exception *pargException);
45
52idrs_string idrs_string_idrs_Create2(const idrs_string argOther, idrs_exception *pargException);
53
60idrs_string idrs_string_idrs_Create3(utf8_type const * argBuffer, idrs_exception *pargException);
61
69idrs_string idrs_string_idrs_Create4(utf8_type const * argBuffer, IDRS_UINT const uiSize, idrs_exception *pargException);
70
77idrs_string idrs_string_idrs_Create5(utf32_type const * argBuffer, idrs_exception *pargException);
78
86idrs_string idrs_string_idrs_Create6(utf32_type const * argBuffer, IDRS_UINT const uiSize, idrs_exception *pargException);
87
94idrs_string idrs_string_idrs_Create7(utf16_type const * argBuffer, idrs_exception *pargException);
95
103idrs_string idrs_string_idrs_Create8(utf16_type const * argBuffer, IDRS_UINT const uiSize, idrs_exception *pargException);
104
111idrs_string idrs_string_idrs_Create9(wchar_t const * argBuffer, idrs_exception *pargException);
112
120idrs_string idrs_string_idrs_Create10(wchar_t const * argBuffer, IDRS_UINT const uiSize, idrs_exception *pargException);
121
129utf8_type const * idrs_string_c_str(const idrs_string argidrs_string, idrs_exception *pargException);
130
138utf32_type const * idrs_string_utf32_c_str(const idrs_string argidrs_string, idrs_exception *pargException);
139
147utf16_type const * idrs_string_utf16_c_str(const idrs_string argidrs_string, idrs_exception *pargException);
148
154void idrs_string_clear(idrs_string argidrs_string, idrs_exception *pargException);
155
164idrs_string idrs_string_assign(idrs_string argidrs_string, const idrs_string argOther, idrs_exception *pargException);
165
174idrs_string idrs_string_assign2(idrs_string argidrs_string, char const * argBuffer, idrs_exception *pargException);
175
185idrs_string idrs_string_assign3(idrs_string argidrs_string, char const * argBuffer, IDRS_UINT const uiSize, idrs_exception *pargException);
186
195idrs_string idrs_string_assign4(idrs_string argidrs_string, utf32_type const * argBuffer, idrs_exception *pargException);
196
206idrs_string idrs_string_assign5(idrs_string argidrs_string, utf32_type const * argBuffer, IDRS_UINT const uiSize, idrs_exception *pargException);
207
216idrs_string idrs_string_assign6(idrs_string argidrs_string, utf16_type const * argBuffer, idrs_exception *pargException);
217
227idrs_string idrs_string_assign7(idrs_string argidrs_string, utf16_type * argBuffer, IDRS_UINT const uiSize, idrs_exception *pargException);
228
237idrs_string idrs_string_assign8(idrs_string argidrs_string, wchar_t const * argBuffer, idrs_exception *pargException);
238
248idrs_string idrs_string_assign9(idrs_string argidrs_string, wchar_t * argBuffer, IDRS_UINT const uiSize, idrs_exception *pargException);
249
250IDRS_UINT idrs_string_length(const idrs_string argidrs_string, idrs_exception *pargException);
251
259IDRS_UINT idrs_string_utf32_length(const idrs_string argidrs_string, idrs_exception *pargException);
260
268IDRS_UINT idrs_string_utf16_length(const idrs_string argidrs_string, idrs_exception *pargException);
269
277IDRS_UINT idrs_string_size(const idrs_string argidrs_string, idrs_exception *pargException);
278
286IDRS_UINT idrs_string_utf32_size(const idrs_string argidrs_string, idrs_exception *pargException);
287
295IDRS_UINT idrs_string_utf16_size(const idrs_string argidrs_string, idrs_exception *pargException);
296
304IDRS_BOOL idrs_string_empty(const idrs_string argidrs_string, idrs_exception *pargException);
305
317IDRS_INT idrs_string_compare(const idrs_string argidrs_string, const idrs_string argOther, idrs_exception *pargException);
318
328IDRS_BOOL idrs_string_starts_with(const idrs_string argidrs_string, const idrs_string strPrefix, idrs_exception *pargException);
329
339IDRS_BOOL idrs_string_ends_with(const idrs_string argidrs_string, const idrs_string strSuffix, idrs_exception *pargException);
340
351IDRS_INT idrs_string_find(const idrs_string argidrs_string, const idrs_string strValue, IDRS_INT const iOffset, idrs_exception *pargException);
352
362IDRS_INT idrs_string_find2(const idrs_string argidrs_string, const idrs_string strValue, idrs_exception *pargException);
363
374IDRS_INT idrs_string_rfind(const idrs_string argidrs_string, const idrs_string strValue, IDRS_INT const iOffset, idrs_exception *pargException);
375
385IDRS_INT idrs_string_rfind2(const idrs_string argidrs_string, const idrs_string strValue, idrs_exception *pargException);
386
397idrs_string idrs_string_substr(const idrs_string argidrs_string, IDRS_INT const iPosition, IDRS_INT const iCount, idrs_exception *pargException);
398
408idrs_string idrs_string_substr2(const idrs_string argidrs_string, IDRS_INT const iPosition, idrs_exception *pargException);
409
418idrs_string idrs_string_append(idrs_string argidrs_string, const idrs_string argOther, idrs_exception *pargException);
419
427void idrs_string_Destroy(idrs_string argidrs_string, idrs_exception *pargException);
428
429#ifdef __cplusplus
430}
431#endif /* __cplusplus */
432
433#endif /* IDRS_STRING_INTERFACE_H */
Class that handles a string of characters.
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.
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.
void idrs_string_clear(idrs_string argidrs_string, idrs_exception *pargException)
Clear the string content.
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_substr2(const idrs_string argidrs_string, IDRS_INT const iPosition, idrs_exception *pargException)
Returns the specified substring.
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_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_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.
utf8_type const * idrs_string_c_str(const idrs_string argidrs_string, idrs_exception *pargException)
Returns the non-modifiable array of characters.
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_idrs_Create3(utf8_type const *argBuffer, idrs_exception *pargException)
Constructor from a null terminated char buffer.
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_UINT idrs_string_utf16_length(const idrs_string argidrs_string, idrs_exception *pargException)
Returns the string length in its utf-16 representation.
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_substr(const idrs_string argidrs_string, IDRS_INT const iPosition, IDRS_INT const iCount, idrs_exception *pargException)
Returns the specified substring.
IDRS_BOOL idrs_string_empty(const idrs_string argidrs_string, idrs_exception *pargException)
Checks wheter the string is empty.
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.
utf16_type const * idrs_string_utf16_c_str(const idrs_string argidrs_string, idrs_exception *pargException)
Returns the non-modifiable array of wide characters.
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_UINT idrs_string_utf32_size(const idrs_string argidrs_string, idrs_exception *pargException)
Returns the string length in its utf-32 representation.
idrs_string idrs_string_idrs_Create(idrs_exception *pargException)
Default constructor.
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_UINT idrs_string_size(const idrs_string argidrs_string, idrs_exception *pargException)
Returns the string length in its utf-8 representation.
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_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_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_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_idrs_Create6(utf32_type const *argBuffer, IDRS_UINT const uiSize, idrs_exception *pargException)
Constructor from a wide char buffer and a size.
IDRS_UINT idrs_string_utf16_size(const idrs_string argidrs_string, idrs_exception *pargException)
Returns the string length in its utf-16 representation.
IDRS_UINT idrs_string_utf32_length(const idrs_string argidrs_string, idrs_exception *pargException)
Returns the string length in its utf-32 representation.
void idrs_string_Destroy(idrs_string argidrs_string, idrs_exception *pargException)
Destroys a idrs_string handle.
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_idrs_Create2(const idrs_string argOther, idrs_exception *pargException)
Copy constructor from another idrs_string.
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.
utf32_type const * idrs_string_utf32_c_str(const idrs_string argidrs_string, idrs_exception *pargException)
Returns the non-modifiable array of wide characters.
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.
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_ends_with(const idrs_string argidrs_string, const idrs_string strSuffix, idrs_exception *pargException)
Check if this string ends with the given suffix.
Interface for idrsstd wrapper.
IDRS_INT IDRS_BOOL
A Boolean value.
Definition idrsstd_interface.h:37
int IDRS_INT
A signed integer.
Definition idrsstd_interface.h:25
unsigned int IDRS_UINT
An unsigned integer.
Definition idrsstd_interface.h:27