case.3
changeset 0 068428edee47
equal deleted inserted replaced
-1:000000000000 0:068428edee47
       
     1 .TH case 3
       
     2 .SH NAME
       
     3 case \- convert ASCII uppercase bytes to lowercase
       
     4 .SH SYNTAX
       
     5 .B #include <case.h>
       
     6 
       
     7 void \fBcase_lowers\fP(\fIs\fR);
       
     8 .br
       
     9 void \fBcase_lowerb\fP(\fIs\fR,\fIlen\fR);
       
    10 
       
    11 int \fBcase_diffs\fP(\fIs\fR,\fIt\fR);
       
    12 .br
       
    13 int \fBcase_equals\fP(\fIs\fR,\fIt\fR);
       
    14 .br
       
    15 int \fBcase_starts\fP(\fIs\fR,\fIt\fR);
       
    16 
       
    17 int \fBcase_diffb\fP(\fIs\fR,\fIlen\fR,\fIt\fR);
       
    18 .br
       
    19 int \fBcase_startb\fP(\fIs\fR,\fIlen\fR,\fIt\fR);
       
    20 
       
    21 char *\fIs\fR;
       
    22 .br
       
    23 char *\fIt\fR;
       
    24 .br
       
    25 unsigned int \fIlen\fR;
       
    26 .SH DESCRIPTION
       
    27 .B case_lowers
       
    28 converts each uppercase byte in the string
       
    29 .I s
       
    30 to lowercase.
       
    31 .I s
       
    32 must be 0-terminated.
       
    33 
       
    34 .B case_lowerb
       
    35 converts each uppercase byte in the buffer
       
    36 .IR s ,
       
    37 of length
       
    38 .IR len ,
       
    39 to lowercase.
       
    40 
       
    41 .B case_diffs
       
    42 lexicographically compares lowercase versions of the strings
       
    43 .I s
       
    44 and
       
    45 .IR t .
       
    46 It returns something positive, negative, or zero
       
    47 when the first is larger than, smaller than, or equal to the second.
       
    48 .I s
       
    49 and
       
    50 .I t
       
    51 must be 0-terminated.
       
    52 
       
    53 .B case_equals
       
    54 means
       
    55 .BR !case_diffs .
       
    56 
       
    57 .B case_starts
       
    58 returns 1 if a lowercase version of
       
    59 .I s
       
    60 starts with a lowercase version of
       
    61 .IR t .
       
    62 .I s
       
    63 and
       
    64 .I t
       
    65 must be 0-terminated.
       
    66 
       
    67 .B case_diffb
       
    68 lexicographically compares lowercase versions of the buffers
       
    69 .I s
       
    70 and
       
    71 .IR t ,
       
    72 each of length
       
    73 .IR len .
       
    74 It returns something positive, negative, or zero
       
    75 when the first is larger than, smaller than, or equal to the second.
       
    76 
       
    77 .B case_startb
       
    78 returns 1 if a lowercase version of the buffer
       
    79 .IR s ,
       
    80 of length
       
    81 .IR len ,
       
    82 starts with a lowercase version of the string
       
    83 .IR t .
       
    84 .I t
       
    85 must be 0-terminated.
       
    86 
       
    87 The
       
    88 .B case
       
    89 routines
       
    90 are ASCII-specific.
       
    91 They are suitable for programs that handle
       
    92 case-independent networking protocols.
       
    93 
       
    94 All comparisons are performed on unsigned bytes.
       
    95 .SH "SEE ALSO"
       
    96 byte_diff(3),
       
    97 byte_equal(3),
       
    98 str_diff(3),
       
    99 str_equal(3),
       
   100 str_start(3)