| 255 | } |
| 256 | |
| 257 | [[nodiscard]] constexpr u64 index_of(const text_view& pattern, const u64 from = 0, const u64 size = SIZE_MAX) const noexcept |
| 258 | { |
| 259 | if(pattern.is_empty()) |
| 260 | return global_constant::INDEX_INVALID; |
| 261 | u64 raw_from = from; u64 raw_size = size; |
| 262 | this->get_codeunit_range(raw_from, raw_size); |
| 263 | const u64 found_raw_index = this->view_.index_of(pattern.view_, raw_from, raw_size); |
| 264 | if(found_raw_index == global_constant::INDEX_INVALID) |
| 265 | return global_constant::INDEX_INVALID; |
| 266 | return this->get_codepoint_index(found_raw_index); |
| 267 | } |
| 268 | |
| 269 | [[nodiscard]] constexpr u64 index_of(const codepoint& pattern, const u64 from = 0, const u64 size = SIZE_MAX) const noexcept |
| 270 | { |