summaryrefslogtreecommitdiff
path: root/goo/GooString.h
diff options
context:
space:
mode:
Diffstat (limited to 'goo/GooString.h')
-rw-r--r--goo/GooString.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/goo/GooString.h b/goo/GooString.h
index 9bacc22f..7ad9a524 100644
--- a/goo/GooString.h
+++ b/goo/GooString.h
@@ -242,12 +242,10 @@ public:
int cmpN(const char *sA, int n) const { return compare(0, n, sA); }
// Return true if strings starts with prefix
- POPPLER_PRIVATE_EXPORT bool startsWith(const char *prefix) const;
- // Return true if string ends with suffix
- POPPLER_PRIVATE_EXPORT bool endsWith(const char *suffix) const;
+ using std::string::starts_with;
- static bool startsWith(std::string_view str, std::string_view prefix) { return str.size() >= prefix.size() && 0 == str.compare(0, prefix.size(), prefix); }
- static bool endsWith(std::string_view str, std::string_view suffix) { return str.size() >= suffix.size() && 0 == str.compare(str.size() - suffix.size(), suffix.size(), suffix); }
+ // Return true if string ends with suffix
+ using std::string::ends_with;
bool hasUnicodeMarker() const { return hasUnicodeMarker(*this); }
static bool hasUnicodeMarker(const std::string &s) { return s.size() >= 2 && s[0] == '\xfe' && s[1] == '\xff'; }