MCPcopy Create free account
hub / github.com/ashvardanian/StringZilla / size

Method size

include/stringzilla/stringzilla.hpp:1116–1119  ·  view source on GitHub ↗

@brief Count UTF-8 characters in the string. */

Source from the content-addressed store, hash-verified

1114
1115 /** @brief Count UTF-8 characters in the string. */
1116 size_type size() const noexcept {
1117 string_view_type view(haystack_);
1118 return sz_utf8_count(view.data(), view.size());
1119 }
1120
1121 difference_type ssize() const noexcept { return static_cast<difference_type>(size()); }
1122 bool empty() const noexcept { return size() == 0; }

Callers

nothing calls this directly

Calls 3

sz_utf8_countFunction · 0.70
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected