Functions | |
| int | kate_text_get_character (kate_text_encoding text_encoding, const char **const text, size_t *len0) |
| int | kate_text_set_character (kate_text_encoding text_encoding, int c, char **const text, size_t *len0) |
| int | kate_text_remove_markup (kate_text_encoding text_encoding, char *text, size_t *len0) |
| int | kate_text_validate (kate_text_encoding text_encoding, const char *text, size_t len0) |
| int kate_text_get_character | ( | kate_text_encoding | text_encoding, | |
| const char **const | text, | |||
| size_t * | len0 | |||
| ) |
Reads a code point from the string, advancing the text pointer to the next one.
| text_encoding | the character encoding the text is coded in | |
| text | a pointer to the text pointer, to be advanced to the next character on success | |
| len0 | a pointer to the length of the buffer, including any terminating NUL, to be decreased by the number of bytes that text is advanced on success |
KATE_E_* error
| int kate_text_remove_markup | ( | kate_text_encoding | text_encoding, | |
| char * | text, | |||
| size_t * | len0 | |||
| ) |
Removes markup from the given text.
| text_encoding | the character encoding the text is coded in | |
| text | the text to remove markup from | |
| len0 | the length in bytes of the text, including any terminating NUL - will be set to the length of the text with markup removed, including any terminating NUL |
KATE_E_* error
| int kate_text_set_character | ( | kate_text_encoding | text_encoding, | |
| int | c, | |||
| char **const | text, | |||
| size_t * | len0 | |||
| ) |
Writes a code point to the given string, advancing the text pointer to the next byte.
| text_encoding | the character encoding the text is coded in | |
| c | the unicode code point to write to the string | |
| text | a pointer to the text pointer, to be advanced to the next character on success | |
| len0 | a pointer to the length of the buffer, including any terminating NUL, to be decreased by the number of bytes that text is advanced on success |
KATE_E_* error
| int kate_text_validate | ( | kate_text_encoding | text_encoding, | |
| const char * | text, | |||
| size_t | len0 | |||
| ) |
Validates text for the given character encoding, flagging partial sequences and invalid sequences.
| text_encoding | the character encoding the text is coded in | |
| text | the text to validate (may include embedded NULs) | |
| len0 | the length in bytes of the text, including any terminating NUL |
KATE_E_* error
1.5.4