Char_casecmp in dir.c

dir.c e$B$Ne(B char_casecmp e$B$G!"e(B

static int
char_casecmp(const char *p1, const char *p2, rb_encoding *enc, const int
nocase)
{
const char *p1end, *p2end;
int c1, c2;

if (!*p1) return *p1;
if (!*p2) return -*p2;

e$B$H$$$&$H$3$m$N!"e(B

if (!*p2) return -*p2;

e$B$O4qL/$J5$$,$7$^$9!#e(B

return -*p2 e$B$,F0:n$9$k$N$Oe(B !*p2 e$B$N$H$-!"$9$J$o$Ae(B *p2 == 0
e$B$Ne(B
e$B$H$-$G$9$,!"$=$&$9$k$He(B -*p2 e$B$O>o$Ke(B 0
e$B$K$J$j$^$9!#$=$l$J$N$Ke(B
e$B$o$6$o$6IiId9f$r$D$1$F$"$k$C$F$N$O$I$&$$$&0U?^$J$s$G$7$g$&e(B?

At Tue, 29 Jul 2008 11:27:52 +0900,
[email protected]@%$G$9!#e(B

Tanaka A. wrote:

if (!*p2) return -*p2;

e$B$o$6$o$6IiId9f$r$D$1$F$"$k$C$F$N$O$I$&$$$&0U?^$J$s$G$7$g$&e(B?

return *p1 e$B$He(B return -*p2 e$B$,[email protected]$C$?$N$GD>$7$^$7$?!#e(B

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs