◆ GraphemeClusterIterator()
| duckdb::GraphemeIterator::GraphemeClusterIterator::GraphemeClusterIterator |
( |
const char * | s, |
|
|
size_t | len ) |
507471 : s(s_p), len(len_p) {
507472 if (s) {
507473 cluster.start = 0;
507474 cluster.end = 0;
507475 Next();
507476 } else {
507477 SetInvalid();
507478 }
◆ Next()
| void duckdb::GraphemeIterator::GraphemeClusterIterator::Next |
( |
| ) |
|
507492 {
507493 if (IsInvalid()) {
507494 throw std::runtime_error("Grapheme cluster out of bounds!");
507495 }
507496 if (cluster.end >= len) {
507497
507498 SetInvalid();
507499 return;
507500 }
507502 cluster.start = cluster.end;
507503 cluster.end = next_pos;
static size_t NextGraphemeCluster(const char *s, size_t len, size_t pos)
Returns the position (in bytes) of the next grapheme cluster.
Definition duckdb.cpp:507427
◆ SetInvalid()
| void duckdb::GraphemeIterator::GraphemeClusterIterator::SetInvalid |
( |
| ) |
|
507481 {
507482 s = nullptr;
507483 len = 0;
507484 cluster.start = 0;
507485 cluster.end = 0;
◆ IsInvalid()
| bool duckdb::GraphemeIterator::GraphemeClusterIterator::IsInvalid |
( |
| ) |
const |
507488 {
507489 return !s;
◆ operator++()
507506 {
507507 Next();
507508 return *this;
◆ operator!=()
| bool duckdb::GraphemeIterator::GraphemeClusterIterator::operator!= |
( |
const GraphemeClusterIterator & | other | ) |
const |
507510 {
507511 return !(len == other.len && s == other.s && cluster.start == other.cluster.start &&
507512 cluster.end == other.cluster.end);
◆ operator*()
| GraphemeCluster duckdb::GraphemeIterator::GraphemeClusterIterator::operator* |
( |
| ) |
const |
507515 {
507516 if (IsInvalid()) {
507517 throw std::runtime_error("Grapheme cluster out of bounds!");
507518 }
507519 return cluster;
The documentation for this class was generated from the following file: