strings.h

Overview

Related Modules:

UTILS

Description:

Declares commonly used functions for byte sequence operations.

You can use the functions provided in this file to perform the mathematical operations required during development. Example operations include comparing, copying byte sequences, and setting a byte sequence to 0. You must pay attention to memory management during function calls.

Since:

1.0

Version:

1.0

Summary

Functions

Function Name

Description

bcmp (const void s1, const void s2, size_t n)

int 

Compares byte sequences.

bcopy (const void src, void dest, size_t n)

void 

Copies byte sequences.

bzero (void s, size_t n)

void 

Sets byte sequences to zero.

index (const char s, int c)

char  

Searches for the first position of the matched character in a string.

rindex (const char s, int c)

char  

Searches for the last position of the matched character in a string.

ffs (int i)

int 

Searches for the first bit in a word of the integer type.

ffsl (long int i)

int 

Searches for the first bit in a word of the long integer type.

ffsll (long long int i)

int 

Searches for the first bit in a word of the 8-byte long integer type.

strcasecmp (const char _l, const char _r)

int 

Compares two strings (string 1 and string 2), regardless of the letter case.

strncasecmp (const char _l, const char *_r, size_t n)

int 

Compares a specified length of two strings (string 1 and string 2), regardless of the letter case.