std::strstr
来自cppreference.com
|
|
该页由英文版wiki使用Google Translate机器翻译而来。
该翻译可能存在错误或用词不当。鼠标停留在文本上可以看到原版本。你可以帮助我们修正错误或改进翻译。参见说明请点击这里. |
| 在头文件 <cstring> 中定义
|
||
| const char *strstr( const char *dest, const char *src ); |
||
| char *strstr( char *dest, const char *src ); |
||
。发现第一次出现的字节串
src中的字节串所指向的dest. 原文:
Finds the first occurrence of the byte string
src in the byte string pointed to by dest. [编辑] 。参数。
| dest | - | 。检查null结尾的字节串的指针。
原文: pointer to the null-terminated byte string to examine |
| src | - | 。以NULL结尾的字节要搜索的字符串指针。
原文: pointer to the null-terminated byte string to search for |
===。 返回值。===
。
dest,或NULL中找到的子串的第一个字符的指针,如果没有这样的性格被发现。如果src指向一个空字符串,dest返回.原文:
Pointer to the first character of the found substring in
dest, or NULL if no such character is found. If src points to an empty string, dest is returned.[编辑] 。为例。
| 本章尚未完成 原因:暂无示例 |
[编辑] 。另请参阅。
| 找到第一个出现的字符 原文: finds the first occurrence of a character (函数) | |
| 找到最后出现的字符 原文: finds the last occurrence of a character (函数) | |
| C documentation for strstr
| |