summaryrefslogtreecommitdiff
path: root/include/strops.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/strops.hpp')
-rw-r--r--include/strops.hpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/strops.hpp b/include/strops.hpp
index 206aaee..537e058 100644
--- a/include/strops.hpp
+++ b/include/strops.hpp
@@ -18,11 +18,21 @@
#include "config.hpp"
+/// @brief Namespace for string operations.
namespace strops {
+ /// @brief Copy `src` into `dst`, with size check.
+ /// @return Size copied.
size_t copy(char *dst, const char *src, size_t size);
+
+ /// @brief Check if param `a` contains `b`.
+ /// @return Pointer to the match inside `a`. or `NULL` when no match is found.
char* contains(char* a, char* b);
+
+ /// @brief Check if `a` matches string `b`.
+ /// @return `true` when strings match, else `false`.
bool equals(const char* a, const char* b);
+
char* tokenize(char* a, const char* find);
s32 format_va(char* s, size_t n, const char* format, va_list args);