MCPcopy Create free account
hub / github.com/Norbyte/bg3se / FromString

Method FromString

BG3Extender/GameDefinitions/Base/Base.cpp:10–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8BEGIN_SE()
9
10TranslatedString TranslatedString::FromString(StringView const& sv)
11{
12 TranslatedString ts;
13 auto sep = sv.find_first_of(';');
14 if (sep != STDString::npos) {
15 ts.Handle.Handle = FixedString(sv.substr(0, sep));
16 ts.Handle.Version = (uint16_t)atoi(sv.substr(sep + 1).data());
17 } else {
18 ts.Handle.Handle = FixedString(sv);
19 }
20 return ts;
21}
22
23std::optional<StringView> TranslatedString::Get() const
24{

Callers

nothing calls this directly

Calls 2

FixedStringClass · 0.85
dataMethod · 0.45

Tested by

no test coverage detected