缺省情况下,文件结束字符串是下划线(_);如果将该字符作为单个输入参数来发送,则它之后的所有内容将被忽略。
By default, the end-of-file string is an underscore (_); if that character is sent as a single input argument, everything after it is ignored.
如果源字符串至少和目标一样长,那么函数 strncpy(3) 还不会使用 NUL 来结束字符串;这可能会在以后导致严重破坏。
The function strncpy(3) also doesn't NUL-terminate its destination if the source string is at least as long as the destination; this can cause havoc later.
你也能使用StartsWith及EndsWith方法来快速确定在指定值的开始或结束是否包含指定字符串。
You can also use the StartsWith and EndsWith methods to quickly determine whether a value starts or ends with a specific string.
5 So similarly would there be the number 65 next to this then the corresponding number for V-I-D and then there's generally a special character at the end that looks like a zero that says end of string here.
同样,A就是,接着再填上V-I-D对应的ASCII码,在最后还有添上一个特殊的字符,有点像0,代表这是该字符串结束。
So I just have to see, oh, here's a D, let me keep looking, D here's an A, keep looking here's a V, here's an I, here's a D and yet, and this is one tidbit we introduced a week or so ago, how do I now know if I'm just given the address of the start of the string where the end is?
我只需要看到,哦,这里是一个D,让我接着往下看,这里是A,接着这是V,这是I,这是,然而,这是我们一周以前介绍的花絮,如果你给我一个字符串开始的地址,我怎么知道它什么时候结束?
This was the special value that said to the computer string stops here and because you have that barrier given to you at the end of every string, just the most efficient way you can pass strings around is just by passing the address of their very first bytes, the location in RAM.
这是一个特殊的值,表示的是,字符串在这里结束,因为在每个字符串的末尾,都有那个关卡,这是一个最有效率的方式,你可以通过传递,字符串的第一个字节的地址来传递一个字符串,地址是在RAM中的。
应用推荐