about summary refs log tree commit diff
path: root/src/base/system.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/base/system.h')
-rw-r--r--src/base/system.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/base/system.h b/src/base/system.h
index f71a03ec..62fe02e9 100644
--- a/src/base/system.h
+++ b/src/base/system.h
@@ -1147,6 +1147,22 @@ int str_utf8_decode(const char **ptr);
 */
 int str_utf8_encode(char *ptr, int chr);
 
+/*
+	Function: str_utf8_check
+		Checks if a strings contains just valid utf8 characters.
+	
+	Parameters:
+		str - Pointer to a possible utf8 string.
+		
+	Returns:
+		0 - invalid characters found.
+		1 - only valid characters found.
+
+	Remarks:
+		- The string is treated as zero-terminated utf8 string.
+*/
+int str_utf8_check(const char *str);
+
 #ifdef __cplusplus
 }
 #endif