MCPcopy Create free account
hub / github.com/FastLED/FastLED / interned

Method interned

src/fl/stl/string.cpp.hpp:48–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46}
47
48string string::interned(const char* str, fl::size len) FL_NOEXCEPT {
49 if (!str || len == 0) return string();
50 // Route through the global interner so identical content
51 // returns the same shared StringHolder (O(1) average lookup,
52 // matches `string::intern()`'s semantics). Previously this
53 // family wrapped a fresh StringHolder per call with no
54 // deduplication — see #2961 CR thread + the follow-on commit.
55 return global_interner().intern(fl::string_view(str, len));
56}
57
58string string::interned(const char* str) FL_NOEXCEPT {
59 if (!str) return string();

Callers

nothing calls this directly

Calls 3

internMethod · 0.80
stringClass · 0.70
string_viewClass · 0.70

Tested by

no test coverage detected