From 2ea89318589331aec39f67e62836892f9c6a9994 Mon Sep 17 00:00:00 2001 From: Antonio SJ Musumeci Date: Sun, 4 Jan 2026 00:37:57 -0600 Subject: [PATCH] str.cpp --- src/str.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/str.cpp b/src/str.cpp index e1ba1c7e..2446aad7 100644 --- a/src/str.cpp +++ b/src/str.cpp @@ -291,6 +291,14 @@ str::startswith(const string &str_, (str_.compare(0,prefix_.size(),prefix_) == 0)); } +bool +str::startswith(const string &str_, + const char *prefix_) +{ + return ((str_.size() >= prefix_.size()) && + (str_.compare(0,prefix_.size(),prefix_) == 0)); +} + bool str::endswith(const string &str_, const string &suffix_)