diff options
Diffstat (limited to 'private/crt32/string/mips/strrchrt.c')
-rw-r--r-- | private/crt32/string/mips/strrchrt.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/private/crt32/string/mips/strrchrt.c b/private/crt32/string/mips/strrchrt.c new file mode 100644 index 000000000..f608c2fc6 --- /dev/null +++ b/private/crt32/string/mips/strrchrt.c @@ -0,0 +1,20 @@ +#include <stdio.h> +#include <string.h> +#include <limits.h> + +void main( int argc, char **argv ) + { + int c; + unsigned char *pstr; + unsigned char string[100]; + + strcpy(string, "ABCDEFGHIJKLMNOPQRST"); + for (c = 'a'; c <= UCHAR_MAX; c++) + { + string[9] = c; + pstr = strrchr( string, c); + if (!pstr) + printf("Fail - Could not find %d in %s\n", c, string); + } + return; + } |