tetengo 1.8.2
A multipurpose library set
Loading...
Searching...
No Matches
tetengo::text::grapheme_splitting::character_width Class Referenceabstract

A character width. More...

#include <character_width.hpp>

+ Inheritance diagram for tetengo::text::grapheme_splitting::character_width:
+ Collaboration diagram for tetengo::text::grapheme_splitting::character_width:

Public Types

enum class  class_type {
  ambiguous , fullwidth , halfwidth , narrow ,
  wide , neutral
}
 A class. More...
 
enum class  emoji_type { emoji , normal }
 An emoji. More...
 

Public Member Functions

virtual ~character_width ()
 Destroys the character width.
 
std::size_t width_of (class_type class_, emoji_type emoji) const
 Returns the width.
 

Detailed Description

A character width.

Member Enumeration Documentation

◆ class_type

A class.

Enumerator
ambiguous 

Ambiguous.

fullwidth 

Fullwidth.

halfwidth 

Halfwidth.

narrow 

Narrow.

wide 

Wide.

neutral 

Neutral.

◆ emoji_type

An emoji.

Enumerator
emoji 

Emoji character.

normal 

Normal charactger.

Member Function Documentation

◆ width_of()

std::size_t tetengo::text::grapheme_splitting::character_width::width_of ( class_type class_,
emoji_type emoji ) const
nodiscard

Returns the width.

Parameters
class_A class.
emojiAn emoji.
Returns
The width of the code point.

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