diff options
author | ProjectRevoTPP <projectrevotpp@hotmail.com> | 2017-05-09 02:36:30 -0400 |
---|---|---|
committer | ProjectRevoTPP <projectrevotpp@hotmail.com> | 2017-05-09 02:36:30 -0400 |
commit | fc761599b412206f80d961a6052dce49b9998689 (patch) | |
tree | 1f3eb8f01ae005b8b509d1f120ce5d7bce230992 /src/string_util.c | |
parent | d343d1f19a74657489d987dbd97b84e7389ae295 (diff) | |
parent | 4b4f716ae0c582068928a4ae7b31d9d10ac89eb5 (diff) |
Merge branch 'master' of https://github.com/pret/pokeruby
Diffstat (limited to 'src/string_util.c')
-rw-r--r-- | src/string_util.c | 15 |
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) |