Beispiel #1
0
TextStream& TextStream::operator<<(char c)
{
    if (m_hasByteArray)
        m_byteArray.append(c);

    if (m_string)
        m_string->append(DeprecatedChar(c));
    return *this;
}
Beispiel #2
0
String extractMIMETypeFromMediaType(const String& mediaType)
{
    String mimeType;
    unsigned length = mediaType.length();
    for (unsigned offset = 0; offset < length; offset++) {
        UChar c = mediaType[offset];
        if (c == ';' || c == ',')
            break;
        else if (DeprecatedChar(c).isSpace()) // FIXME: This seems wrong, " " is an invalid MIME type character according to RFC 2045.  bug 8644
            continue;
        // FIXME: This is a very slow way to build a string, given WebCore::String's implementation.
        mimeType += String(&c, 1);
    }
    return mimeType;
}
Beispiel #3
0
void Parser::skipWS()
{
    while (m_nextPos < m_data.length() && DeprecatedChar(m_data[m_nextPos]).isSpace())
        ++m_nextPos;
}