decancer 4.0.0
A library that removes common unicode confusables/homoglyphs from strings.
No such query exists :(
Functions
Type definitions
Macros
Loading...
Searching...
No Matches
decancer_translation_t Struct Reference

Represents a translation of a unicode codepoint. More...

Data Structures

union  [union].contents
 A union of translation results. This can either be a unicode character or a UTF-8 encoded string. More...

Data Fields

uint8_t kind
 The type of the translation result. This can be any of the following values:

Detailed Description

Represents a translation of a unicode codepoint.

typedef struct {
uint8_t kind;
union {
uint32_t character;
struct {
const uint8_t* contents;
size_t size;
void* __heap;
} string;
} contents;
} decancer_translation_t;
uint8_t kind
The type of the translation result. This can be any of the following values:
Definition decancer.h:479
See also
decancer_cure_char
decancer_translation_init
decancer_translation_clone
decancer_translation_free
Note
You are responsible in freeing this object later passing it as a pointer to decancer_translation_free.
Warning
You MUST pass this struct to decancer_translation_init first before using decancer_cure_char. Not doing so could result in possible undefined behavior.

Field Documentation

◆ kind

uint8_t decancer_translation_t::kind

The type of the translation result. This can be any of the following values:

See also
DECANCER_TRANSLATION_KIND_CHARACTER
DECANCER_TRANSLATION_KIND_STRING
DECANCER_TRANSLATION_KIND_NONE

The documentation for this struct was generated from the following file: