Lely core libraries 2.3.4
strings.c File Reference

This file is part of the C11 and POSIX compatibility library. More...

#include "libc.h"
#include <lely/libc/strings.h>
#include <ctype.h>
Include dependency graph for strings.c:

Go to the source code of this file.

Functions

int strcasecmp (const char *s1, const char *s2)
 Compares the string at s1 to the string at s2, ignoring differences in case.
 
int strncasecmp (const char *s1, const char *s2, size_t n)
 Compares at most n characters from the the string at s1 to the string at s2, ignoring differences in case.
 

Detailed Description

This file is part of the C11 and POSIX compatibility library.

See also
lely/libc/strings.h
Author
J. S. Seldenthuis jseld.nosp@m.enth.nosp@m.uis@l.nosp@m.ely..nosp@m.com

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Definition in file strings.c.

Function Documentation

◆ strcasecmp()

int strcasecmp ( const char *  s1,
const char *  s2 
)

Compares the string at s1 to the string at s2, ignoring differences in case.

Returns
an integer greater than, equal to, or less than 0 if the string at s1 is greater than, equal to, or less than the string at s2.

Definition at line 72 of file strings.c.

◆ strncasecmp()

int strncasecmp ( const char *  s1,
const char *  s2,
size_t  n 
)

Compares at most n characters from the the string at s1 to the string at s2, ignoring differences in case.

Returns
an integer greater than, equal to, or less than 0 if the string at s1 is greater than, equal to, or less than the string at s2.

Definition at line 87 of file strings.c.