標(biāo)題: Function srtchr的用法 [打印本頁]

作者: 51黑黑黑    時(shí)間: 2016-2-23 15:34
標(biāo)題: Function srtchr的用法
const char * strchr ( const char * str, int character ); char *strchr ( char * str, int character );
Locate first occurrence of character in string
Returns a pointer to the first occurrenceof character in the Cstring
str.
The terminating null-character is considered part of the Cstring. Therefore, it can also be located in order to retrieve apointer to the end of a string.
Parameters(參數(shù))

str :   C string.character:Character to be located. It is passed asits int promotion, butit is internally converted backto char for thecomparison.Return Value:



A pointer to the first occurrenceof character in str.Ifthe character isnot found, the function returns a null pointer.









歡迎光臨 (http://www.torrancerestoration.com/bbs/) Powered by Discuz! X3.1