strchr
来自cppreference.com
|
|
该页由英文版wiki使用Google Translate机器翻译而来。
该翻译可能存在错误或用词不当。鼠标停留在文本上可以看到原版本。你可以帮助我们修正错误或改进翻译。参见说明请点击这里. |
| 在头文件 <string.h> 中定义
|
||
| const char *strchr( const char *str, int ch ); |
||
| char *strchr( char *str, int ch ); |
||
找到第一次出现的字符
ch中的字节串所指向的str. 原文:
Finds the first occurrence of the character
ch in the byte string pointed to by str. 目录 |
[编辑] 参数
| str | - | NULL结尾的字节串的指针来进行分析
原文: pointer to the null-terminated byte string to be analyzed |
| ch | - | 搜索字符
|
[编辑] 返回值
str,或NULL找到的字符的指针,如果没有这样的字符被找到原文:
Pointer to the found character in
str, or NULL if no such character is found.[编辑] 示例
| 本章尚未完成 原因:暂无示例 |
[编辑] 另请参阅
| 找到最后出现的字符 原文: finds the last occurrence of a character (函数) | |
| 发现的第一个位置在一个字符串中的任何字符,在另一个字符串 原文: finds the first location of any character in one string, in another string (函数) | |
| C++ documentation for strchr
| |