From b1f156ab35ac1d0a4936b90df7ff57e3dce6e71f Mon Sep 17 00:00:00 2001 From: Ivan Donchevskii Date: Thu, 2 Aug 2018 12:33:04 +0200 Subject: [PATCH] Utils: Provide more QByteArray methods in Utf8String Change-Id: Ibf33f44f1303b68ec3c9ca2c2fc153ddf6eb1f2c Reviewed-by: Marco Bubke --- src/libs/sqlite/utf8string.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/src/libs/sqlite/utf8string.h b/src/libs/sqlite/utf8string.h index cd1d6fdb550..f23237d2bea 100644 --- a/src/libs/sqlite/utf8string.h +++ b/src/libs/sqlite/utf8string.h @@ -116,6 +116,26 @@ public: 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 { return byteArray.contains(text.byteArray); @@ -151,6 +171,16 @@ public: 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 { return byteArray.isNull();