From 0a2b0e347d926ac0f29c9dd0f49e00634e822d0e Mon Sep 17 00:00:00 2001 From: Aldrik Ramaekers Date: Sun, 5 Oct 2025 14:37:11 +0200 Subject: namespace administration --- src/strops.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/strops.cpp') 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); -- cgit v1.2.3-70-g09d2