OpenTTD Source 20250428-master-g68ba2735ea
|
Constant span of UTF-8 encoded data. More...
#include <utf8.hpp>
Data Structures | |
class | iterator |
Bidirectional input iterator over codepoints. More... | |
Public Member Functions | |
Utf8View (std::string_view src) | |
iterator | begin () const |
iterator | end () const |
iterator | GetIterAtByte (size_t offset) const |
Create iterator pointing at codepoint, which occupies the byte position "offset". | |
Private Attributes | |
std::string_view | src |
Utf8View::iterator Utf8View::GetIterAtByte | ( | size_t | offset | ) | const |
Create iterator pointing at codepoint, which occupies the byte position "offset".
"offset" does not need to point at the first byte of the UTF-8 sequence, the iterator will still address the correct position of the first byte.
offset | Byte offset into view. |
Definition at line 83 of file utf8.cpp.
Referenced by Textbuf::DeleteChar(), and Layouter::GetCharPosition().