Decode a data: URL into its mimetype and payload.
Returns a null string if the URL could not be decoded.
77 payload = data.
mid(pos + 1);
89 while (data.
at(i) ==
' ')
91 if (data.
at(i) ==
'=')
void chop(int n)
Removes n bytes from the end of the byte array.
void truncate(int pos)
Truncates the byte array at index position pos.
static QByteArray fromPercentEncoding(const QByteArray &pctEncoded, char percent='%')
Returns a decoded copy of the URI/URL-style percent-encoded input.
The QByteArray class provides an array of bytes.
QByteArray toLower() const
Returns a lowercase copy of the byte array.
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
QByteArray & prepend(char c)
Prepends the character ch to this byte array.
The QString class provides a Unicode character string.
QString host() const
Returns the host of the URL if it is defined; otherwise an empty string is returned.
bool startsWith(const QByteArray &a) const
Returns true if this byte array starts with byte array ba; otherwise returns false.
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
QByteArray trimmed() const
Returns a byte array that has whitespace removed from the start and the end.
static const char * data(const QByteArray &arr)
QByteArray mid(int index, int len=-1) const
Returns a byte array containing len bytes from this byte array, starting at position pos...
int indexOf(char c, int from=0) const
Returns the index position of the first occurrence of the character ch in the byte array...
QByteArray toEncoded(FormattingOptions options=None) const
Returns the encoded representation of the URL if it's valid; otherwise an empty QByteArray is returne...
static QByteArray fromBase64(const QByteArray &base64)
Returns a decoded copy of the Base64 array base64.
QString scheme() const
Returns the scheme of the URL.
bool isEmpty() const
Returns true if the byte array has size 0; otherwise returns false.
char at(int i) const
Returns the character at index position i in the byte array.
QByteArray & remove(int index, int len)
Removes len bytes from the array, starting at index position pos, and returns a reference to the arra...
bool endsWith(const QByteArray &a) const
Returns true if this byte array ends with byte array ba; otherwise returns false. ...