LibTRO 0
Uma biblioteca com funções semelhantes às do C para fins educacionais na Eletrônica, IF Sul Pelotas.
Carregando...
Procurando...
Nenhuma entrada encontrado
uchar.h
Ir para a documentação desse arquivo.
1
2
3#ifndef TRO_UCHAR_H_
4#define TRO_UCHAR_H_
5
6#include "tro/private/api.h"
7
8#include <stdint.h>
9#include <stddef.h>
10
11TRO__C_API_BEGIN
12
17typedef uint8_t tro_u8code;
18
28#define TRO_MULTI_U8CODE_MAX 4
29
35typedef uint16_t tro_u16code;
36
46#define TRO_MULTI_U16CODE_MAX 2
47
51typedef uint32_t tro_urune;
52
59#define TRO_URUNE_MAX 0x10FFFF
60
70#define TRO_URUNE_IS_VALID(rune) \
71 ((rune < 0xD800 || 0xDFFF < rune) && rune <= TRO_URUNE_MAX)
72
87TRO__API size_t tro_urune_to_u8codes(tro_urune rune, tro_u8code *out);
88
106TRO__API size_t tro_u8codes_to_urune(const tro_u8code *seq, size_t seqlen,
107 tro_urune *out);
108
123TRO__API size_t tro_urune_to_u16codes(tro_urune rune, tro_u16code *out);
124
142TRO__API size_t tro_u16codes_to_urune(const tro_u16code *seq, size_t seqlen,
143 tro_urune *out);
162TRO__API size_t tro_u8codes_to_u16codes(const tro_u8code *seq, size_t seqlen,
163 tro_u16code *out, size_t *outlen);
164
183TRO__API size_t tro_u16codes_to_u8codes(const tro_u16code *seq, size_t seqlen,
184 tro_u8code *out, size_t *outlen);
185
199typedef uint16_t tro_char16;
200
208TRO__API size_t tro_str8_urune_len(const char *str, size_t strl);
209
219TRO__API size_t tro_str16_urune_len(const tro_char16 *str, size_t strl);
220
221TRO__C_API_END
222
223#endif // TRO_UCHAR_H_
uint16_t tro_char16
Definição uchar.h:199
uint8_t tro_u8code
Definição uchar.h:17
size_t tro_str16_urune_len(const tro_char16 *str, size_t strl)
size_t tro_u8codes_to_u16codes(const tro_u8code *seq, size_t seqlen, tro_u16code *out, size_t *outlen)
size_t tro_u8codes_to_urune(const tro_u8code *seq, size_t seqlen, tro_urune *out)
size_t tro_str8_urune_len(const char *str, size_t strl)
size_t tro_urune_to_u16codes(tro_urune rune, tro_u16code *out)
uint32_t tro_urune
Definição uchar.h:51
size_t tro_u16codes_to_urune(const tro_u16code *seq, size_t seqlen, tro_urune *out)
size_t tro_urune_to_u8codes(tro_urune rune, tro_u8code *out)
uint16_t tro_u16code
Definição uchar.h:35
size_t tro_u16codes_to_u8codes(const tro_u16code *seq, size_t seqlen, tro_u8code *out, size_t *outlen)