A grapheme.
More...
#include <grapheme_splitter.hpp>
|
constexpr | grapheme (std::size_t offset, std::size_t width) |
| Creates a grapheme.
|
|
constexpr std::size_t | offset () const |
| Returns the offset in the UTF-8 string.
|
|
constexpr std::size_t | width () const |
| Returns the width when using a monospace font.
|
|
◆ grapheme()
constexpr tetengo::text::grapheme::grapheme |
( |
std::size_t |
offset, |
|
|
std::size_t |
width |
|
) |
| |
|
inlineconstexpr |
Creates a grapheme.
- Parameters
-
offset | An offset in the UTF-8 string. |
width | A width when using a monospace font. |
◆ offset()
constexpr std::size_t tetengo::text::grapheme::offset |
( |
| ) |
const |
|
inlineconstexpr |
Returns the offset in the UTF-8 string.
- Returns
- The offset.
◆ width()
constexpr std::size_t tetengo::text::grapheme::width |
( |
| ) |
const |
|
inlineconstexpr |
Returns the width when using a monospace font.
- Returns
- The width.
◆ operator==
Returns true when one grapheme is equal to another.
- Parameters
-
one | One grapheme. |
another | Another grapheme. |
- Return values
-
true | When one is equal to another. |
false | Otherwise. |
The documentation for this class was generated from the following file: