Lines Matching defs:s1

146     move( char_type* s1, const char_type* s2, size_t n )
148 return NS_STATIC_CAST(char_type*, memmove(s1, s2, n * sizeof(char_type)));
153 copy( char_type* s1, const char_type* s2, size_t n )
155 return NS_STATIC_CAST(char_type*, memcpy(s1, s2, n * sizeof(char_type)));
160 copyASCII( char_type* s1, const char* s2, size_t n )
162 for (char_type* s = s1; n--; ++s, ++s2) {
166 return s1;
185 compare( const char_type* s1, const char_type* s2, size_t n )
188 return wmemcmp(s1, s2, n);
190 for ( ; n--; ++s1, ++s2 )
192 if ( !eq(*s1, *s2) )
193 return to_int_type(*s1) - to_int_type(*s2);
202 compareASCII( const char_type* s1, const char* s2, size_t n )
204 for ( ; n--; ++s1, ++s2 )
207 if ( !eq_int_type(to_int_type(*s1), to_int_type(*s2)) )
208 return to_int_type(*s1) - to_int_type(*s2);
214 // this version assumes that s2 is null-terminated and s1 has length n.
215 // if s1 is shorter than s2 then we return -1; if s1 is longer than s2,
219 compareASCIINullTerminated( const char_type* s1, size_t n, const char* s2 )
221 for ( ; n--; ++s1, ++s2 )
226 if ( !eq_int_type(to_int_type(*s1), to_int_type(*s2)) )
227 return to_int_type(*s1) - to_int_type(*s2);
262 compareLowerCaseToASCII( const char_type* s1, const char* s2, size_t n )
264 for ( ; n--; ++s1, ++s2 )
269 char_type lower_s1 = ASCIIToLower(*s1);
277 // this version assumes that s2 is null-terminated and s1 has length n.
278 // if s1 is shorter than s2 then we return -1; if s1 is longer than s2,
282 compareLowerCaseToASCIINullTerminated( const char_type* s1, size_t n, const char* s2 )
284 for ( ; n--; ++s1, ++s2 )
291 char_type lower_s1 = ASCIIToLower(*s1);
427 move( char_type* s1, const char_type* s2, size_t n )
429 return NS_STATIC_CAST(char_type*, memmove(s1, s2, n * sizeof(char_type)));
434 copy( char_type* s1, const char_type* s2, size_t n )
436 return NS_STATIC_CAST(char_type*, memcpy(s1, s2, n * sizeof(char_type)));
441 copyASCII( char_type* s1, const char* s2, size_t n )
443 return copy(s1, s2, n);
455 compare( const char_type* s1, const char_type* s2, size_t n )
457 return memcmp(s1, s2, n);
462 compareASCII( const char_type* s1, const char* s2, size_t n )
470 return compare(s1, s2, n);
473 // this version assumes that s2 is null-terminated and s1 has length n.
474 // if s1 is shorter than s2 then we return -1; if s1 is longer than s2,
478 compareASCIINullTerminated( const char_type* s1, size_t n, const char* s2 )
480 // can't use strcmp here because we don't want to stop when s1
482 for ( ; n--; ++s1, ++s2 )
487 if ( *s1 != *s2 )
488 return to_int_type(*s1) - to_int_type(*s2);
509 compareLowerCaseToASCII( const char_type* s1, const char* s2, size_t n )
511 for ( ; n--; ++s1, ++s2 )
516 char_type lower_s1 = ASCIIToLower(*s1);
523 // this version assumes that s2 is null-terminated and s1 has length n.
524 // if s1 is shorter than s2 then we return -1; if s1 is longer than s2,
528 compareLowerCaseToASCIINullTerminated( const char_type* s1, size_t n, const char* s2 )
530 for ( ; n--; ++s1, ++s2 )
537 char_type lower_s1 = ASCIIToLower(*s1);