summaryrefslogtreecommitdiff
path: root/src/string_util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/string_util.c')
-rw-r--r--src/string_util.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/string_util.c b/src/string_util.c
index e537cff3a..957d70153 100644
--- a/src/string_util.c
+++ b/src/string_util.c
@@ -137,6 +137,21 @@ u16 StringLength(const u8 *str)
return length;
}
+#ifdef GERMAN
+s32 StringLengthN(const u8 *str, s32 n)
+{
+ s32 i;
+
+ for (i = 0; i < n && str[i] != EOS; i++)
+ ;
+
+ if (i == n)
+ i = 0;
+
+ return i;
+}
+#endif
+
s32 StringCompare(const u8 *str1, const u8 *str2)
{
while (*str1 == *str2)