Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
danmar committed Feb 12, 2025
1 parent c860f18 commit b9005f8
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions externals/simplecpp/simplecpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,12 +148,11 @@ static unsigned long long stringToULL(const std::string &s)
istr >> ret;
return ret;
}
namespace {
bool startsWith(const std::string &s, const std::string &p)

static bool startsWith(const std::string &s, const std::string &p)
{
return (s.size() >= p.size()) && std::equal(p.begin(), p.end(), s.begin());
}
}

static bool endsWith(const std::string &s, const std::string &e)
{
Expand Down Expand Up @@ -2372,6 +2371,11 @@ namespace simplecpp {
namespace simplecpp {

#ifdef __CYGWIN__
bool startsWith(const std::string &str, const std::string &s)
{
return (str.size() >= s.size() && str.compare(0, s.size(), s) == 0);
}

std::string convertCygwinToWindowsPath(const std::string &cygwinPath)
{
std::string windowsPath;
Expand Down

0 comments on commit b9005f8

Please sign in to comment.