//==============================================================================
bool File::isAbsolutePath (StringRef path)
{
    return path.text[0] == separator
           #if JUCE_WINDOWS
            || (path.isNotEmpty() && path.text[1] == ':');
           #else
            || path.text[0] == '~';
Example #2
0
int StringArray::addTokens (StringRef text, StringRef breakCharacters, StringRef quoteCharacters)
{
    int num = 0;

    if (text.isNotEmpty())
    {
        for (String::CharPointerType t (text.text);;)
        {
            String::CharPointerType tokenEnd (CharacterFunctions::findEndOfToken (t,
                                                                                  breakCharacters.text,
                                                                                  quoteCharacters.text));
            strings.add (String (t, tokenEnd));
            ++num;

            if (tokenEnd.isEmpty())
                break;

            t = ++tokenEnd;
        }
    }

    return num;
}