1 Star 0 Fork 5.3K

Srtian / 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.

马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/srtian96/docs.git
git@gitee.com:srtian96/docs.git
srtian96
docs
docs
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891