Lely core libraries 2.3.4
strings.h File Reference

This header file is part of the C11 and POSIX compatibility library; it includes <strings.h>, if it exists, and defines any missing functionality. More...

#include <lely/features.h>
#include <stddef.h>
Include dependency graph for strings.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int ffs (int i)
 Finds the index of the first (least significant) bit set in i.
 
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 header file is part of the C11 and POSIX compatibility library; it includes <strings.h>, if it exists, and defines any missing functionality.

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.h.

Function Documentation

◆ ffs()

int ffs ( int  i)
inline

Finds the index of the first (least significant) bit set in i.

Bits are numbered counting from 1.

Returns
the index of the first bit set, or 0 if i is 0.

Definition at line 58 of file strings.h.

◆ 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.