1 Star 0 Fork 4.9K

famoustang / docs

forked from OpenHarmony / docs 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
strings-h.md 7.33 KB
一键复制 编辑 原始数据 按行查看 历史
wenjun 提交于 2020-09-08 10:08 . add OpenHarmony 1.0 baseline

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.

1
https://gitee.com/famoustang/docs.git
git@gitee.com:famoustang/docs.git
famoustang
docs
docs
master

搜索帮助