MCPcopy Create free account
hub / github.com/audacity/audacity / GetSquashedName

Method GetSquashedName

libraries/lib-components/EffectInterface.cpp:53–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51}
52
53Identifier EffectDefinitionInterface::GetSquashedName(const Identifier &ident)
54{
55 // Get rid of leading and trailing white space
56 auto name = ident.GET();
57 name.Trim(true).Trim(false);
58
59 if (name.empty())
60 return {};
61
62 wxStringTokenizer st(name, wxT(" "));
63 wxString id;
64
65 // CamelCase the name
66 while (st.HasMoreTokens()) {
67 wxString tok = st.GetNextToken();
68 id += tok.Left(1).MakeUpper() + tok.Mid(1).MakeLower();
69 }
70
71 return id;
72}
73
74EffectDefinitionInterface::~EffectDefinitionInterface() = default;
75

Callers 2

ExportPresetsMethod · 0.80
ImportPresetsMethod · 0.80

Calls 2

TrimMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected