* @brief Count UTF-8 characters in the string (not bytes). * @return The number of UTF-8 codepoints. */
| 4177 | * @return The number of UTF-8 codepoints. |
| 4178 | */ |
| 4179 | size_type utf8_count() const noexcept { |
| 4180 | sz_ptr_t start; |
| 4181 | sz_size_t length; |
| 4182 | sz_string_range(&string_, &start, &length); |
| 4183 | return sz_utf8_count(start, length); |
| 4184 | } |
| 4185 | |
| 4186 | /** |
| 4187 | * @brief Find the byte offset of the nth UTF-8 character. |