core: turn existing_filename into std::string

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2024-03-16 16:06:39 +01:00 committed by bstoeger
parent 37f2207f94
commit 41cb916060
10 changed files with 59 additions and 55 deletions

View file

@ -76,5 +76,11 @@ std::string format_string_std(const char *fmt, Args&&... args)
return res;
}
// Sadly, starts_with only with C++20!
inline bool starts_with(const std::string &s, const char *s2)
{
return s.rfind(s2, 0) == 0;
}
#endif
#endif // SUBSURFACE_STRING_H