diff options
| author | Aldrik Ramaekers <aldrikboy@gmail.com> | 2025-10-05 14:37:11 +0200 |
|---|---|---|
| committer | Aldrik Ramaekers <aldrikboy@gmail.com> | 2025-10-05 14:37:11 +0200 |
| commit | 0a2b0e347d926ac0f29c9dd0f49e00634e822d0e (patch) | |
| tree | f84ecc1e559227b1435f6647b36d150f4b101585 /src/strops.cpp | |
| parent | cd827834f9ee329c27b82d987f0d1d48a854a954 (diff) | |
namespace administration
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); |
