diff options
Diffstat (limited to 'src/strops.cpp')
| -rw-r--r-- | src/strops.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/strops.cpp b/src/strops.cpp index f8184f1..356ce5b 100644 --- a/src/strops.cpp +++ b/src/strops.cpp @@ -43,6 +43,11 @@ namespace strops { return (srclen); } + bool equals(const char* a, const char* b) + { + return strcmp(a, b) == 0; + } + char* contains(char* haystack, char* needle) { do { @@ -91,14 +96,14 @@ namespace strops { *w = '\0'; // terminate } - void replace_int32(char *buf, size_t buf_size, const char *search, int32_t number) + void replace_int32(char *buf, size_t buf_size, const char *search, s32 number) { char num_buf[200]; snprintf(num_buf, 200, "%d", number); strops::replace(buf, buf_size, search, num_buf); } - void replace_int64(char *buf, size_t buf_size, const char *search, int64_t number) + void replace_int64(char *buf, size_t buf_size, const char *search, s64 number) { char num_buf[200]; snprintf(num_buf, 200, "%lld", number); |
