MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / ParseAssignmentString

Function ParseAssignmentString

common/StringUtil.cpp:324–341  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

322 }
323
324 bool ParseAssignmentString(const std::string_view str, std::string_view* key, std::string_view* value)
325 {
326 const std::string_view::size_type pos = str.find('=');
327 if (pos == std::string_view::npos)
328 {
329 *key = std::string_view();
330 *value = std::string_view();
331 return false;
332 }
333
334 *key = StripWhitespace(str.substr(0, pos));
335 if (pos != (str.size() - 1))
336 *value = StripWhitespace(str.substr(pos + 1));
337 else
338 *value = std::string_view();
339
340 return true;
341 }
342
343 void AppendUTF16CharacterToUTF8(std::string& s, u16 ch)
344 {

Callers 4

LoadPatchLineMethod · 0.85
ExtractPatchInfoMethod · 0.85
GetPS2ElfNameFunction · 0.85

Calls 4

StripWhitespaceFunction · 0.85
substrMethod · 0.80
findMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected