bump cereal (#29561)

old-commit-hash: e726505918bfbaa4ee75714bd6ea391d7fff7fb8
This commit is contained in:
Adeeb Shihadeh
2023-08-23 13:42:37 -07:00
committed by GitHub
parent 97e9d55588
commit 6b2ffe9490
5 changed files with 22 additions and 11 deletions
+8
View File
@@ -253,6 +253,14 @@ std::string dir_name(std::string const &path) {
return path.substr(0, pos);
}
bool starts_with(const std::string &s1, const std::string &s2) {
return strncmp(s1.c_str(), s2.c_str(), s2.size()) == 0;
}
bool ends_with(const std::string &s1, const std::string &s2) {
return strcmp(s1.c_str() + (s1.size() - s2.size()), s2.c_str()) == 0;
}
std::string check_output(const std::string& command) {
char buffer[128];
std::string result;
+2
View File
@@ -77,6 +77,8 @@ float getenv(const char* key, float default_val);
std::string hexdump(const uint8_t* in, const size_t size);
std::string dir_name(std::string const& path);
bool starts_with(const std::string &s1, const std::string &s2);
bool ends_with(const std::string &s1, const std::string &s2);
// ***** random helpers *****
int random_int(int min, int max);