Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

21 lines (18 sloc) 0.409 kb
#include "str.h"
unsigned int str_rchr(register const char *s,int c)
{
register char ch;
register const char *t;
register const char *u;
ch = c;
t = s;
u = 0;
for (;;) {
if (!*t) break; if (*t == ch) u = t; ++t;
if (!*t) break; if (*t == ch) u = t; ++t;
if (!*t) break; if (*t == ch) u = t; ++t;
if (!*t) break; if (*t == ch) u = t; ++t;
}
if (!u) u = t;
return u - s;
}
Jump to Line
Something went wrong with that request. Please try again.