1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-23 01:44:22 +00:00

Introjucer: added minor utility function.

This commit is contained in:
jules 2015-01-12 12:36:45 +00:00
parent 854a3e98d0
commit 7c48d2cff8
2 changed files with 11 additions and 0 deletions

View file

@ -171,6 +171,16 @@ StringArray getSearchPathsFromString (const String& searchPath)
return s;
}
StringArray getCommaOrWhitespaceSeparatedItems (const String& sourceString)
{
StringArray s;
s.addTokens (sourceString, ", \t\r\n", StringRef());
s.trim();
s.removeEmptyStrings();
s.removeDuplicates (false);
return s;
}
void addPlistDictionaryKey (XmlElement* xml, const String& key, const String& value)
{
forEachXmlChildElementWithTagName (*xml, e, "key")

View file

@ -37,6 +37,7 @@ String createGCCPreprocessorFlags (const StringPairArray& defs);
String replacePreprocessorDefs (const StringPairArray& definitions, String sourceString);
StringArray getSearchPathsFromString (const String& searchPath);
StringArray getCommaOrWhitespaceSeparatedItems (const String&);
void setValueIfVoid (Value value, const var& defaultValue);