Raylib C++  1.0.0
Encapsulates the raylib library
Public Member Functions | Static Public Member Functions | List of all members
raylib::text::TextCodepoint Class Reference

RlText codepoints management functions (unicode characters) More...

#include <TextCodepoint.hpp>

Collaboration diagram for raylib::text::TextCodepoint:
Collaboration graph

Public Member Functions

 TextCodepoint (const std::string &text)
 Load all codepoints from a UTF-8 text string. More...
 
const std::vector< int > & getCodepoints () const
 Get the codepoints. More...
 
int getCodepointsCount () const
 Get total number of codepoints in a UTF-8 encoded string. More...
 
std::string toUTF8String (const int &bytesLength)
 Encode text as codepoints array into UTF-8 text string. More...
 

Static Public Member Functions

static std::string codePointToUTF8 (const int &codepoint, int &byteSize)
 Encode one codepoint into UTF-8 byte (array length returned as parameter) More...
 

Detailed Description

RlText codepoints management functions (unicode characters)

Constructor & Destructor Documentation

◆ TextCodepoint()

raylib::text::TextCodepoint::TextCodepoint ( const std::string &  text)
explicit

Load all codepoints from a UTF-8 text string.

Parameters
textthe text to use

Member Function Documentation

◆ codePointToUTF8()

std::string raylib::text::TextCodepoint::codePointToUTF8 ( const int &  codepoint,
int &  byteSize 
)
static

Encode one codepoint into UTF-8 byte (array length returned as parameter)

Parameters
codepointthe codepoint to encode
byteSizethe size of the codepoint will be stored in it
Returns
the codepoint count

◆ getCodepoints()

const std::vector< int > & raylib::text::TextCodepoint::getCodepoints ( ) const

Get the codepoints.

Returns
the codepoints

◆ getCodepointsCount()

int raylib::text::TextCodepoint::getCodepointsCount ( ) const

Get total number of codepoints in a UTF-8 encoded string.

Returns
the codepoints count

◆ toUTF8String()

std::string raylib::text::TextCodepoint::toUTF8String ( const int &  bytesLength)

Encode text as codepoints array into UTF-8 text string.

Parameters
bytesLengththe length of the codepoints (in bytes)
Returns
the UTF-8 text string

The documentation for this class was generated from the following files: