summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAbner Chang <abner.chang@hpe.com>2020-07-25 12:30:39 +0300
committerAnup Patel <anup@brainfault.org>2020-07-29 09:33:45 +0300
commit8e47649eff96c303e02fbd58cdc6c4ed341066ec (patch)
treee35978f64f9bdf9d6803b3cec81512c3e87dcf2b /include
parentec1abf665737af032b8d58f8a5373bcaddedd902 (diff)
downloadopensbi-8e47649eff96c303e02fbd58cdc6c4ed341066ec.tar.xz
lib: Add sbi_strncmp implementation
This commit add an implementation of sbi_strncmp. Signed-off-by: Abner Chang <abner.chang@hpe.com> Reviewed-by: Atish Patra <atish.patra@wdc.com> Reviewed-by: Anup Patel <anup.patel@wdc.com>
Diffstat (limited to 'include')
-rw-r--r--include/sbi/sbi_string.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/sbi/sbi_string.h b/include/sbi/sbi_string.h
index 338075f..b7c2bc2 100644
--- a/include/sbi/sbi_string.h
+++ b/include/sbi/sbi_string.h
@@ -12,8 +12,15 @@
#include <sbi/sbi_types.h>
+/*
+ Provides sbi_strcmp for the completeness of supporting string functions.
+ it is not recommended to use sbi_strcmp() but use sbi_strncmp instead.
+*/
+
int sbi_strcmp(const char *a, const char *b);
+int sbi_strncmp(const char *a, const char *b, size_t count);
+
size_t sbi_strlen(const char *str);
size_t sbi_strnlen(const char *str, size_t count);