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

Function StripWhitespace

common/StringUtil.cpp:244–257  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

242 }
243
244 std::string_view StripWhitespace(const std::string_view str)
245 {
246 std::string_view::size_type start = 0;
247 while (start < str.size() && std::isspace(str[start]))
248 start++;
249 if (start == str.size())
250 return {};
251
252 std::string_view::size_type end = str.size() - 1;
253 while (end > start && std::isspace(str[end]))
254 end--;
255
256 return str.substr(start, end - start + 1);
257 }
258
259 void StripWhitespace(std::string* str)
260 {

Callers 15

ParseCommandLineArgsMethod · 0.85
Main.cppFile · 0.85
TrimPatchLineMethod · 0.85
ExtractPatchInfoMethod · 0.85
GetPortableModePathMethod · 0.85
ParsePlayedTimeLineMethod · 0.85
LogCPUCapabilitiesMethod · 0.85
SplitChordMethod · 0.85
PrettifyInputBindingMethod · 0.85
GetPS2ElfNameFunction · 0.85
ApplyTemplateFunction · 0.85
LoadFontDataMethod · 0.85

Calls 4

substrMethod · 0.80
sizeMethod · 0.45
c_strMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected