strlen
基本解釋
- n.字符長(zhǎng)度
英漢例句
- The strlen() function returns the length of a string.
函數(shù)的作用是:返回字符串長(zhǎng)度。 - We can use this fact to write another version of strlen, which computes the length of a string.
如果要更詳細(xì)的了解,建議還是把這章細(xì)讀一遍。 - When we call strlen, it returns the number of characters in a zero-terminated array of single-byte characters.
許多年來(lái),許多人一直將字符串作為一系列單字節(jié)字符來(lái)進(jìn)行編碼,并在結(jié)尾處加上0. - The strlen() call was there only to make sure the value is actually accessed....
如果在聲明中用表達(dá)式的結(jié)果對(duì)其賦值會(huì)導(dǎo)致解析錯(cuò)誤。 - BTW: if you want to call recv() with the maximal length of return_msg, please use sizeof(return_msg) instead of strlen(return_msg).
但是就是不明白為什么如果接受的長(zhǎng)度大于了實(shí)際返回的長(zhǎng)度就可能出現(xiàn)我上述的那種情況呢(好像不是所有的時(shí)候都那樣)!