Operation Captive Reference Manual |
---|
unicode —
#define captive_UnicodeString_to_utf8_alloca(string_UnicodeString) #define captive_utf8_to_UnicodeString_alloca(string_utf8) gboolean captive_validate_ucs4 (const gunichar *string_ucs4); gboolean captive_validate_ucs2 (const captive_ucs2 *string_ucs2); gboolean captive_validate_ucs2_fixlen (const captive_ucs2 *string_ucs2, glong string_ucs2_fixlen); gboolean captive_validate_utf8 (const gchar *string_utf8); glong captive_ucs2_strlen (const captive_ucs2 *string_ucs2); gboolean captive_validate_UnicodeString (const UNICODE_STRING *string_UnicodeString); gboolean captive_validate_UnicodeString_noterm (const UNICODE_STRING *string_UnicodeString_noterm); gboolean captive_validate_AnsiString (const ANSI_STRING *string_AnsiString); gchar* captive_UnicodeString_to_utf8_malloc (const UNICODE_STRING *string_UnicodeString); PUNICODE_STRING captive_utf8_to_UnicodeString_malloc (const gchar *string_utf8); const gunichar2* captive_ucs4_to_utf16_const (const gunichar *string_ucs4); gboolean captive_ucs2_compare (const captive_ucs2 *string_a_ucs2, const captive_ucs2 *string_b_ucs2); gboolean captive_UnicodeString_compare (const UNICODE_STRING *string_a_UnicodeString, const UNICODE_STRING *string_b_UnicodeString); gboolean captive_ucs2_compare_insensitive (const captive_ucs2 *string_a_ucs2, const captive_ucs2 *string_b_ucs2); gboolean captive_UnicodeString_compare_insensitive (const UNICODE_STRING *string_a_UnicodeString, const UNICODE_STRING *string_b_UnicodeString); void captive_FsRtlLegalAnsiCharacterArray_init (void);
#define captive_UnicodeString_to_utf8_alloca(string_UnicodeString)
alloca(3)-based conversion from PUNICODE_STRING to plain utf8 string.
Returns: const gchar * alloca(3)ed converted string string_UnicodeString.
string_UnicodeString : | PUNICODE_STRING type of string to convert. |
#define captive_utf8_to_UnicodeString_alloca(string_utf8)
alloca(3)-based conversion from plain utf8 string to PUNICODE_STRING.
Returns: PUNICODE_STRING alloca(3)ed converted string string_utf8.
string_utf8 : | const gchar * string in utf8 to convert. |
gboolean captive_validate_ucs4 (const gunichar *string_ucs4);
Checks the validity of all 32-bit unicharacters of 0-terminated string. It is required to have characters complying to g_unichar_validate().
string_ucs4 : | const gunichar * type string to validate. Invalid string input is forbidden. |
Returns : | TRUE if the string is valid. |
gboolean captive_validate_ucs2 (const captive_ucs2 *string_ucs2);
Checks the validity of all 16-bit unicharacters of 0-terminated string. It is required to have characters complying to g_unichar_validate().
string_ucs2 : | const captive_ucs2 * type string to validate. Invalid string input is forbidden. UTF-16 encoded strings are forbidden. |
Returns : | TRUE if the string is valid. |
gboolean captive_validate_ucs2_fixlen (const captive_ucs2 *string_ucs2, glong string_ucs2_fixlen);
Checks the validity of first string_ucs2_fixlen 16-bit unicharacters of string_ucs2. It is required to have characters complying to g_unichar_validate(). String length must be equal or larger than string_ucs2_fixlen;
string_ucs2 : | const captive_ucs2 * type string to validate. Invalid string input is forbidden. UTF-16 encoded strings are forbidden. |
string_ucs2_fixlen : | Number of characters from string_ucs2 to check. captive_ucs2_strlen(string_ucs2)>=string_ucs2_fixlen is required. Negative value is forbidden. |
Returns : | TRUE if the string is valid. |
gboolean captive_validate_utf8 (const gchar *string_utf8);
Checks the validity of all utf8 of 0-terminated string. It is required to have characters complying to g_utf8_validate().
string_utf8 : | const gchar * utf8 type string to validate. Invalid string input is forbidden. |
Returns : | TRUE if the string is valid. |
glong captive_ucs2_strlen (const captive_ucs2 *string_ucs2);
Counts the number of characters (=2bytes) in strings_ucs2.
string_ucs2 : | String of type const gunichar2 * in pure UCS-2 Invalid string input is forbidden. UTF-16 encoded pairs are forbidden. |
Returns : | string_ucs2 length in UCS-2 characters. |
gboolean captive_validate_UnicodeString (const UNICODE_STRING *string_UnicodeString);
Checks the internal consistency of the given string_UnicodeString. It is required to have characters complying to g_unichar_validate(). string_UnicodeString MUST be zero-terminated.
string_UnicodeString : | PUNICODE_STRING type string to validate. Invalid string input is forbidden. |
Returns : | TRUE if the string is valid. |
gboolean captive_validate_UnicodeString_noterm (const UNICODE_STRING *string_UnicodeString_noterm);
Checks the internal consistency of the given string_UnicodeString. It is required to have characters complying to g_unichar_validate(). string_UnicodeString_noterm does not neet to be zero-terminated.
string_UnicodeString_noterm : | PUNICODE_STRING type string to validate. Invalid string input is forbidden. |
Returns : | TRUE if the string is valid. |
gboolean captive_validate_AnsiString (const ANSI_STRING *string_AnsiString);
Checks the internal consistency of the given string_AnsiString.
string_AnsiString : | PANSI_STRING type string to validate. Invalid string input is forbidden. |
Returns : | TRUE if the string is valid. |
gchar* captive_UnicodeString_to_utf8_malloc (const UNICODE_STRING *string_UnicodeString);
g_malloc()-based conversion from PUNICODE_STRING to plain utf8 string. You must free the result with g_free() function.
string_UnicodeString : | PUNICODE_STRING type of string to convert. |
Returns : | const gchar * g_malloc()ed converted string string_UnicodeString. |
PUNICODE_STRING captive_utf8_to_UnicodeString_malloc (const gchar *string_utf8);
g_malloc()-based conversion from plain utf8 string to PUNICODE_STRING. You must free the result with g_free() function.
string_utf8 : | const gchar * string in utf8 to convert. |
Returns : | PUNICODE_STRING g_malloc()ed converted string string_utf8. |
const gunichar2* captive_ucs4_to_utf16_const (const gunichar *string_ucs4);
Constant string conversion from 32-bit wchar_t to 16-bit (possible pairs of) UTF-16. You may not modify the result in any way.
It is guaranteed to get two different string addresses for two different input addresses even if the input strings content is the same. Otherwise we would behave as GCC option -fmerge-constants which results in C non-conforming behaviour.
FIXME: UTF-16 encoding IS NOT IMPLEMENTED.
See also captive_ucs4_to_ucs2_const().
string_ucs4 : | const gunichar * type of persistent string to convert. This string MUST remain readable with the same content forever. |
Returns : | const gunichar2 * converted string string_ucs4. |
gboolean captive_ucs2_compare (const captive_ucs2 *string_a_ucs2, const captive_ucs2 *string_b_ucs2);
Compares case-sensitively string_a_ucs2 and string_b_ucs2.
string_a_ucs2 : | First string of type const gunichar2 * in pure UCS-2. Invalid string input is forbidden. UTF-16 encoded pairs are forbidden. |
string_b_ucs2 : | Second string of type const gunichar2 * in pure UCS-2. Invalid string input is forbidden. UTF-16 encoded pairs are forbidden. |
Returns : | TRUE if string_a_ucs2 and string_b_ucs2 are the same. |
gboolean captive_UnicodeString_compare (const UNICODE_STRING *string_a_UnicodeString, const UNICODE_STRING *string_b_UnicodeString);
Compares case-sensitively string_a_UnicodeString and string_b_UnicodeString.
string_a_UnicodeString : | First string of type PUNICODE_STRING. Invalid string input is forbidden. |
string_b_UnicodeString : | Second string of type PUNICODE_STRING. Invalid string input is forbidden. |
Returns : | TRUE if string_a_UnicodeString and string_b_UnicodeString are the same. |
gboolean captive_ucs2_compare_insensitive (const captive_ucs2 *string_a_ucs2, const captive_ucs2 *string_b_ucs2);
Compares case-insensitively string_a_ucs2 and string_b_ucs2.
string_a_ucs2 : | First string of type const gunichar2 * in pure UCS-2. Invalid string input is forbidden. UTF-16 encoded pairs are forbidden. |
string_b_ucs2 : | Second string of type const gunichar2 * in pure UCS-2. Invalid string input is forbidden. UTF-16 encoded pairs are forbidden. |
Returns : | TRUE if string_a_ucs2 and string_b_ucs2 are the same. |
gboolean captive_UnicodeString_compare_insensitive (const UNICODE_STRING *string_a_UnicodeString, const UNICODE_STRING *string_b_UnicodeString);
Compares case-insensitively string_a_UnicodeString and string_b_UnicodeString.
string_a_UnicodeString : | First string of type PUNICODE_STRING. Invalid string input is forbidden. |
string_b_UnicodeString : | Second string of type PUNICODE_STRING. Invalid string input is forbidden. |
Returns : | TRUE if string_a_UnicodeString and string_b_UnicodeString are the same. |
<< ps_reactos | unicode_reactos >> |