1ustrncmp(3) Allegro manual ustrncmp(3)
2
3
4
6 ustrncmp - Compares up to n letters of two strings. Allegro game pro‐
7 gramming library.
8
10 #include <allegro.h>
11
12
13 int ustrncmp(const char *s1, const char *s2, int n);
14
16 This function compares up to `n' characters of `s1' and `s2'. Example:
17
18 if (ustrncmp(prefix, long_string, ustrlen(prefix)) == 0) {
19 /* long_string starts with prefix */
20 }
21
23 Returns zero if the substrings are equal, a positive number if `s1'
24 comes after `s2' in the ASCII collating sequence, else a negative num‐
25 ber.
26
27
29 uconvert(3), ustrsize(3), ustrsizez(3), ustrcmp(3), ustricmp(3), ustr‐
30 nicmp(3)
31
32
33
34Allegro version 4.4.3 ustrncmp(3)