forked from qt-creator/qt-creator
Utils: Provide more QByteArray methods in Utf8String
Change-Id: Ibf33f44f1303b68ec3c9ca2c2fc153ddf6eb1f2c Reviewed-by: Marco Bubke <marco.bubke@qt.io>
This commit is contained in:
@@ -116,6 +116,26 @@ public:
|
|||||||
byteArray.append(textToAppend.byteArray);
|
byteArray.append(textToAppend.byteArray);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void chop(int n)
|
||||||
|
{
|
||||||
|
byteArray.chop(n);
|
||||||
|
}
|
||||||
|
|
||||||
|
int indexOf(const Utf8String &text) const
|
||||||
|
{
|
||||||
|
return byteArray.indexOf(text.byteArray);
|
||||||
|
}
|
||||||
|
|
||||||
|
int indexOf(const char *text) const
|
||||||
|
{
|
||||||
|
return byteArray.indexOf(text);
|
||||||
|
}
|
||||||
|
|
||||||
|
int indexOf(char character) const
|
||||||
|
{
|
||||||
|
return byteArray.indexOf(character);
|
||||||
|
}
|
||||||
|
|
||||||
bool contains(const Utf8String &text) const
|
bool contains(const Utf8String &text) const
|
||||||
{
|
{
|
||||||
return byteArray.contains(text.byteArray);
|
return byteArray.contains(text.byteArray);
|
||||||
@@ -151,6 +171,16 @@ public:
|
|||||||
return byteArray.endsWith(text.byteArray);
|
return byteArray.endsWith(text.byteArray);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool endsWith(const char *text) const
|
||||||
|
{
|
||||||
|
return byteArray.endsWith(text);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool endsWith(char character) const
|
||||||
|
{
|
||||||
|
return byteArray.endsWith(character);
|
||||||
|
}
|
||||||
|
|
||||||
bool isNull() const
|
bool isNull() const
|
||||||
{
|
{
|
||||||
return byteArray.isNull();
|
return byteArray.isNull();
|
||||||
|
Reference in New Issue
Block a user