libwsx libwsx
WSwan extra library for the Wonderful toolchain
Loading...
Searching...
No Matches
utf8.h File Reference
#include <stdbool.h>
#include <stdint.h>
#include <wonderful.h>

Go to the source code of this file.

Functions

char * wsx_utf8_encode_next (char *s, uint32_t chr)
 Encode the next character in an UTF-8 string.
uint32_t wsx_utf8_decode_next (const char __far **s)
 Decode the next character in an UTF-8 string.

Function Documentation

◆ wsx_utf8_decode_next()

uint32_t wsx_utf8_decode_next ( const char __far ** s)

Decode the next character in an UTF-8 string.

Parameters
sPointer to far pointer to character. Will be modified to point to the next character.
Returns
uint32_t The decoded character.

◆ wsx_utf8_encode_next()

char * wsx_utf8_encode_next ( char * s,
uint32_t chr )

Encode the next character in an UTF-8 string.

Parameters
sPointer to encode character to.
chrCharacter to encode.
Returns
char* Pointer to the first byte after the encoded character.