summaryrefslogtreecommitdiffstats
path: root/private/crt32/string/mips/strrchrt.c
blob: f608c2fc63ce33039e22e4b88e96b7e04349f703 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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;
  }