libtransistor
A userland library for the Nintendo Switch
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
encoding.h
Go to the documentation of this file.
1 
7 #pragma once
8 
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
12 
13 #include<stdint.h>
14 #include<string.h>
15 
16 typedef uint16_t trn_char16_t;
17 
22 trn_char16_t *trn_utf8_to_utf16(trn_char16_t *out, const char *in, size_t n);
23 
28 char *trn_utf16_to_utf8(char *out, const trn_char16_t *in, size_t n);
29 
30 #ifdef __cplusplus
31 }
32 #endif
trn_char16_t * trn_utf8_to_utf16(trn_char16_t *out, const char *in, size_t n)
Converts a UTF-8 string to UTF-16 Writes at most n characters to out, returning NULL if there is an e...
char * trn_utf16_to_utf8(char *out, const trn_char16_t *in, size_t n)
Converts a UTF-16 string to UTF-8 Writes at most n characters to out, returning NULL if there is an e...