summaryrefslogtreecommitdiff
path: root/src/string_func.h
diff options
context:
space:
mode:
authorrubidium42 <rubidium@openttd.org>2021-05-30 11:20:00 +0200
committerrubidium42 <rubidium42@users.noreply.github.com>2021-06-13 10:26:58 +0200
commitfed3e3305f6437a0d3ccf231585595838369b907 (patch)
tree2da623bc724b386e7cb363f646b868c8c5a7f8d8 /src/string_func.h
parent2d0abf5a7643afb2b37ca8902d13f1df5c14f5ee (diff)
downloadopenttd-fed3e3305f6437a0d3ccf231585595838369b907.tar.xz
Codechange: add function to determine whether are string starts or ends with a given other string
Diffstat (limited to 'src/string_func.h')
-rw-r--r--src/string_func.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/string_func.h b/src/string_func.h
index 2e258fbd2..0cbf26d6b 100644
--- a/src/string_func.h
+++ b/src/string_func.h
@@ -51,6 +51,9 @@ bool strtolower(std::string &str, std::string::size_type offs = 0);
bool StrValid(const char *str, const char *last) NOACCESS(2);
void StrTrimInPlace(std::string &str);
+bool StrStartsWith(const std::string_view str, const std::string_view prefix);
+bool StrEndsWith(const std::string_view str, const std::string_view suffix);
+
/**
* Check if a string buffer is empty.
*