MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / code_point_index

Function code_point_index

source/extern/fmt/format.h:743–746  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

741
742template <typename Char>
743inline auto code_point_index(basic_string_view<Char> s, size_t n) -> size_t {
744 size_t size = s.size();
745 return n < size ? n : size;
746}
747
748// Calculates the index of the nth code point in a UTF-8 string.
749inline auto code_point_index(string_view s, size_t n) -> size_t {

Callers 1

writeMethod · 0.85

Calls 5

for_each_codepointFunction · 0.85
to_unsignedFunction · 0.85
sizeMethod · 0.45
beginMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected