MCPcopy Create free account
hub / github.com/Pagghiu/SaneCppLibraries / withIterator

Method withIterator

Libraries/Strings/StringView.h:662–671  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

660
661template <typename Func>
662constexpr auto SC::StringView::withIterator(Func&& func) const
663{
664 switch (getEncoding())
665 {
666 case StringEncoding::Ascii: return func(getIterator<StringIteratorASCII>());
667 case StringEncoding::Utf8: return func(getIterator<StringIteratorUTF8>());
668 case StringEncoding::Utf16: return func(getIterator<StringIteratorUTF16>());
669 }
670 StringsAssert::unreachable();
671}
672
673template <typename Func>
674constexpr auto SC::StringView::withIterators(StringView s1, StringView s2, Func&& func)

Callers 1

withIteratorsMethod · 0.80

Calls 1

getEncodingFunction · 0.70

Tested by

no test coverage detected