summaryrefslogtreecommitdiff
path: root/src/strops.cpp
diff options
context:
space:
mode:
authorAldrik Ramaekers <aldrikboy@gmail.com>2025-10-05 14:37:11 +0200
committerAldrik Ramaekers <aldrikboy@gmail.com>2025-10-05 14:37:11 +0200
commit0a2b0e347d926ac0f29c9dd0f49e00634e822d0e (patch)
treef84ecc1e559227b1435f6647b36d150f4b101585 /src/strops.cpp
parentcd827834f9ee329c27b82d987f0d1d48a854a954 (diff)
namespace administration
Diffstat (limited to 'src/strops.cpp')
-rw-r--r--src/strops.cpp9
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);