Dillo v3.1.1-98-g318d1f14
Loading...
Searching...
No Matches
lout::unicode Namespace Reference

Stuff dealing with Unicode characters: UTF-8, character classes etc. More...

Functions

bool isAlpha (int ch)
 Returns whether a given unicode character is an alphabetic character.
 
int decodeUtf8 (const char *s)
 
int decodeUtf8 (const char *s, int len)
 
const char * nextUtf8Char (const char *s)
 
const char * nextUtf8Char (const char *s, int len)
 
int numUtf8Chars (const char *s)
 
int numUtf8Chars (const char *s, int len)
 

Variables

static unsigned char alpha [0x500]
 

Detailed Description

Stuff dealing with Unicode characters: UTF-8, character classes etc.

Function Documentation

◆ decodeUtf8() [1/2]

int lout::unicode::decodeUtf8 ( const char *  s)

Definition at line 73 of file unicode.cc.

Referenced by dw::Hyphenator::isCharPartOfActualWord(), and main().

◆ decodeUtf8() [2/2]

int lout::unicode::decodeUtf8 ( const char *  s,
int  len 
)

Definition at line 92 of file unicode.cc.

◆ isAlpha()

bool lout::unicode::isAlpha ( int  ch)

Returns whether a given unicode character is an alphabetic character.

Definition at line 68 of file unicode.cc.

References alpha.

Referenced by dw::Hyphenator::isCharPartOfActualWord().

◆ nextUtf8Char() [1/2]

const char * lout::unicode::nextUtf8Char ( const char *  s)

◆ nextUtf8Char() [2/2]

const char * lout::unicode::nextUtf8Char ( const char *  s,
int  len 
)

Definition at line 136 of file unicode.cc.

◆ numUtf8Chars() [1/2]

int lout::unicode::numUtf8Chars ( const char *  s)

Definition at line 162 of file unicode.cc.

References nextUtf8Char().

Referenced by dw::Hyphenator::hyphenateSingleWord().

◆ numUtf8Chars() [2/2]

int lout::unicode::numUtf8Chars ( const char *  s,
int  len 
)

Definition at line 170 of file unicode.cc.

References nextUtf8Char().

Variable Documentation

◆ alpha

unsigned char lout::unicode::alpha[0x500]
static

Definition at line 30 of file unicode.cc.

Referenced by isAlpha().