CorsixTH engine (the C++ part)
Open source implementation of Theme Hospital
Loading...
Searching...
No Matches
Functions | Variables
th_strings.cpp File Reference
#include "th_strings.h"
#include "config.h"
#include <cwctype>
#include <stdexcept>

Functions

size_t discard_leading_set_bits (uint8_t &byte)
 
unsigned int next_utf8_codepoint (const char *&sString, const char *end)
 
unsigned int decode_utf8 (const char *sString, const char *end)
 
const charprevious_utf8_codepoint (const char *sString)
 
void skip_utf8_whitespace (const char *&sString, const char *end)
 
unsigned int unicode_to_codepage_437 (unsigned int iCodePoint)
 
unsigned int unicode_to_codepage_mik (unsigned int code_point)
 

Variables

constexpr uint16_t unicode_to_cp437_table [0x60]
 

Function Documentation

◆ decode_utf8()

unsigned int decode_utf8 ( const char sString,
const char end 
)

◆ discard_leading_set_bits()

size_t discard_leading_set_bits ( uint8_t &  byte)

◆ next_utf8_codepoint()

unsigned int next_utf8_codepoint ( const char *&  sString,
const char end 
)

◆ previous_utf8_codepoint()

const char * previous_utf8_codepoint ( const char sString)

◆ skip_utf8_whitespace()

void skip_utf8_whitespace ( const char *&  sString,
const char end 
)

◆ unicode_to_codepage_437()

unsigned int unicode_to_codepage_437 ( unsigned int  iCodePoint)

◆ unicode_to_codepage_mik()

unsigned int unicode_to_codepage_mik ( unsigned int  code_point)

Variable Documentation

◆ unicode_to_cp437_table

constexpr uint16_t unicode_to_cp437_table[0x60]
constexpr
Initial value:
= {
0xFF, 0xAD, 0x9B, 0x9C, 0x3F, 0x9D, 0x3F, 0x3F, 0x3F, 0x3F, 0xA6, 0xAE,
0xAA, 0x3F, 0x3F, 0x3F, 0xF8, 0xF1, 0xFD, 0x3F, 0x3F, 0x3F, 0x3F, 0xFA,
0x3F, 0x3F, 0xA7, 0xAF, 0xAC, 0xAB, 0x3F, 0xA8, 0x3F, 0x3F, 0x3F, 0x3F,
0x8E, 0x8F, 0x3F, 0x80, 0x3F, 0x90, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F,
0x3F, 0xA5, 0x3F, 0x3F, 0x3F, 0x3F, 0x99, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F,
0x9A, 0x3F, 0x3F, 0xE1, 0x85, 0xA0, 0x83, 0x3F, 0x84, 0x86, 0x91, 0x87,
0x8A, 0x82, 0x88, 0x89, 0x8D, 0xA1, 0x8C, 0x8B, 0x3F, 0xA4, 0x95, 0xA2,
0x93, 0x3F, 0x94, 0xF6, 0x3F, 0x97, 0xA3, 0x96, 0x81, 0x3F, 0x3F, 0x98}