1 #include <libnu/casemap.h>
2 
3 #ifdef NU_WITH_TOUPPER
4 
5 #include <libnu/casemap_internal.h>
6 #include "gen/_toupper.c"
7 
nu_toupper(uint32_t codepoint)8 const char* nu_toupper(uint32_t codepoint) {
9 	return _nu_to_something(codepoint, NU_TOUPPER_G, NU_TOUPPER_G_SIZE,
10 		NU_TOUPPER_VALUES_C, NU_TOUPPER_VALUES_I, NU_TOUPPER_COMBINED);
11 }
12 
_nu_toupper(const char * encoded,const char * limit,nu_read_iterator_t read,uint32_t * u,const char ** transform,void * context)13 const char* _nu_toupper(const char *encoded, const char *limit, nu_read_iterator_t read,
14 	uint32_t *u, const char **transform,
15 	void *context) {
16 
17 	(void)(limit);
18 	(void)(context);
19 
20 	uint32_t _u = 0;
21 	const char *np = read(encoded, &_u);
22 
23 	*transform = nu_toupper(_u);
24 
25 	if (u != 0) {
26 		*u = _u;
27 	}
28 
29 	return np;
30 }
31 
32 #endif /* NU_WITH_TOUPPER */
33