summaryrefslogtreecommitdiff
path: root/include/inline_string.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/inline_string.h')
-rw-r--r--include/inline_string.h31
1 files changed, 0 insertions, 31 deletions
diff --git a/include/inline_string.h b/include/inline_string.h
deleted file mode 100644
index 3909422f..00000000
--- a/include/inline_string.h
+++ /dev/null
@@ -1,31 +0,0 @@
-#ifndef INLINE_STRING_H
-#define INLINE_STRING_H
-
-#include <MSL_C/string.h>
-
-inline void inline_strncat(char *dest, const char *src, size_t destSize) {
- if (src != nullptr) {
- size_t destLen = strlen(dest);
- size_t copyLen = strlen(src);
-
- // Make sure copy length isnt more than destination length
- if (destLen + copyLen + 1 >= destSize) {
- copyLen = destSize - destLen - 1;
- }
-
- strncpy(dest + destLen, src, copyLen);
-
- // make sure string is null terminated
- size_t offset = destLen + copyLen;
- dest[offset] = '\0';
- }
-}
-
-inline void inline_strncpy(char *dest, const char *src, size_t destSize) {
- if (src != dest) {
- dest[0] = '\0';
- inline_strncat(dest, src, destSize);
- }
-}
-
-#endif