Ignore:
Timestamp:
04/20/20 23:27:35 (4 years ago)
Author:
Maciej Komosinski
Message:

Added a few utility/helper functions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpp/common/util-string.h

    r840 r913  
    1010
    1111char* strmove(char *a, char *b); //strcpy that works well for overlapping strings ("Source and destination overlap")
     12bool str_starts_with(const char *str, const char *prefix);
     13inline bool starts_with(string& str, const char *prefix) { return str_starts_with(str.c_str(),prefix); } //std::string.starts_with(...) since c++20
    1214
    1315string ssprintf(const char* format, ...);
Note: See TracChangeset for help on using the changeset viewer.