mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
build_tools: Changed the capitalise argument of makeValidIdentifier() to makeCamelCase to make it clearer what it actually does
This commit is contained in:
parent
b4d101d86b
commit
4ec4178a21
2 changed files with 4 additions and 4 deletions
|
|
@ -154,7 +154,7 @@ namespace build_tools
|
|||
return v;
|
||||
}
|
||||
|
||||
String makeValidIdentifier (String s, bool capitalise, bool removeColons, bool allowTemplates, bool allowAsterisks)
|
||||
String makeValidIdentifier (String s, bool makeCamelCase, bool removeColons, bool allowTemplates, bool allowAsterisks)
|
||||
{
|
||||
if (s.isEmpty())
|
||||
return "unknown";
|
||||
|
|
@ -187,12 +187,12 @@ namespace build_tools
|
|||
|
||||
auto n = words[0];
|
||||
|
||||
if (capitalise)
|
||||
if (makeCamelCase)
|
||||
n = n.toLowerCase();
|
||||
|
||||
for (int i = 1; i < words.size(); ++i)
|
||||
{
|
||||
if (capitalise && words[i].length() > 1)
|
||||
if (makeCamelCase && words[i].length() > 1)
|
||||
n << words[i].substring (0, 1).toUpperCase()
|
||||
<< words[i].substring (1).toLowerCase();
|
||||
else
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ namespace build_tools
|
|||
}
|
||||
|
||||
String makeValidIdentifier (String s,
|
||||
bool capitalise,
|
||||
bool makeCamelCase,
|
||||
bool removeColons,
|
||||
bool allowTemplates,
|
||||
bool allowAsterisks = false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue