Coder Social home page Coder Social logo

lanutf's Introduction

LANUTF

0.1.6 stable

A library to handle Unicode (UTF-8) in C++.

Whats new in version 0.1.6

  • Debugging methods added
    • (UTF8Char) tests passed for all 2097023 unicode characters.

UTF8Char

A UTF8 character is a unicode character encoded in UTF8 format, as “ü” or “😊”.

Important methods:

unsigned int get_charcode();

Returns the unicode scalar value aka charcode of the current character.

void composeUTF8Char(char * source)

Composes a new character from UTF8 encoded source.

void composeUTF8Char(const unsigned int code);

Composes a new character from a unicode scalar value aka charcode.

void copy(UTF8Char & other)

Copies data from another UTF8Char.

char const * c_char() const

Returns the c_char encoded version of the UTF8 char.

UTF8_OctetType const octet() const

Returns the UTF8 octet type of the character.

void clear()

Clears the character.

UTF8CharList

A UTF8 character list is a string of UTF8 encoded characters, as “rené” or “âėīøü”.

Important methods:

size_t size() const

Returns the length of list.

size_t c_str_size() const

Returns the length of a possible C string version of the list.

size_t c_index_at(const size_t index) const

Returns the index of this UTF8Char in a possible C string.

size_t c_index_before(const size_t index) const

Returns the index of the UTF8Char before this in a possible C string.

bool empty() const

Returns true if the list is empty.

void remove(size_t index)

Removes a specified UTF8 character.

char * alloc_c_str() const

Allocates a C string version of the list.

void composeCStr(char * str, size_t size) const

Composes a C string version of the list.

static void free_c_str(char * str)

Frees an allocated C string.

size_t append(const char * str)

Adds characters to the end of the list.

size_t append(const char * str, size_t index)

adds characters to a specified position of the list or to the end if the index isn't valid.

void clear()

Clears the list.

Projets using LanUTF

  • LanUI a library to create user interfaces in c++.
    • LanUTF is being user do handle with unicode characters in Freetype2 and text input routines.

lanutf's People

Contributors

renemuala avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.