Is it is just like a string of words or-- >> What does-- what does what mean? A string?
是字符串?单词?还是?,>>你刚刚说什么?,一个字符串?
Otherwise I'm going to check to see is the first and last, there's that - 1 indexing, is the first and last element of the string the same?
是第一个还是最后一个,这就是这边-1的索引内容,这个字符串的第一个,和最后一个的内容是否相同呢?
The head of a string of pigs appeared, snout-up, over the ditch, and he had to screech to a stop and watch the rear of the last pig disappear shaking into the ditch on the other side.
这时候出现了一群猪,仰着鼻子走过水渠,他只好用一个急刹车,目送着最后一只猪大摇大摆地跨过水沟,消失在另一端。
- And because I'm writing out a string that's the same length -- -- my strings aren't getting shorter -- it's creating this illusion of some animation.
因为我写了一个长度相同的字符串-,我的字符串不会变的更短-,它生成一个动画幻觉。
We--I heard your string quartet in Mannheim."
我在曼海姆时听过你的弦乐四重奏"
>> Those bytes in the row are called-- >> A string.
>,这一行字节就是所谓的-,>>,字符串。
It's great for string-matching problems of a whole variety.
都是一个很好的方案,他非常有用。
All right? And if you want to do other things, whoops, sorry-- and add them together, we will get out, again, a concatenation of that string. And these will, we'll let you work through the variations, but these are the simple expressions we can use.
对不对?如果你想要进行一些别的操作,哦,对不起-是加到一块,然后结果值也是,两个字符串的链接,这些会,我们会让大家慢慢学习变量,但是这些是我们能用的最简单的表达式。
So this is a so-called format string.
这就是所谓的字符串格式。
So it does that for us so that you can get away with just knowing the address of the first byte and it will make sure that you know when to stop by including the special value so, in fact, get the string if you type in a three-letter word, we allocate four bytes no matter what because we need an additional byte 0 for this special sentinel value back slash zero at the very end.
它为我们做了这些事情,这样我们就可以,通过第一个字节的地址,它还可以通过包含一个特殊的值,来保证在哪里停止,如果你输入了一个三个字母的单词,就可以获得那个字符串,不管怎样,我们分配四个字节,因为我们在末端需要一个额外的字节,来保存这个特殊的标志值--反斜杠。
Here is the pitch in--of--a string an octave higher so you can see it this way. As you probably know, if you take a long string and pluck it, it's going to take that long string a long time to pass that sort of cycle, if you will, just one pass through that cycle.
这也是个音高,一个高八度的音弦,你可以这样这样看 你们可能知道,如果你拨动长弦,长弦要经过很长时间,才能完成一个震动周期,如果你想,可以尝试下
Well basically what we're doing is we're giving ourselves the ability to create data types the same way that we have some built-ins, so we have things like int, float, string, these are built-in data types.
就是要赋值我们自己创建,和内置的数据类型,相同的数据类型的能力,我们有一些内置的数据类型,如int,float,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 when you have a function called GetString, -- that means it's going to get a string from the user -- -- prompt the user for a string -- whereas printf is literally going to print it, not to paper, but to the screen.
所以当你有一个叫做GetSting的函数,它的意思是从用户那获得一个字符串-,提示用户输入一个字符串-,然而printf的确是用来打印的,不是在纸上,而是在屏幕上。
D-A-V-I-D So when you get a string like D-A-V-I-D, what's really happening is inside your computer's RAM is going a byte where there's some zeros and ones.
譬如你有这么一个字符串,而在你电脑的RAM里将会变成,一个个由0和1组成的字节。
Odds are when this function called gets a string from the user by expecting them to manipulate their keyboard - with their fingers, I need to-- initiatively I'm gonna get back a sentence or a word or a phrase or something.
调用GetString获取的信息也有可能,是通过键盘敲进来的,东西-,它将会返回句子啊,单词啊,或词组啊等等一些信息。
I certainly don't want to assume they're always going to type a three-letter or a four-letter or a two-letter word I want some dynamism but that's fine because get string can get a string of any length, I can then use the string length function to just ask while the program is running how big is the string that I was handed?
当然我不能假设他总是,输入3个字符或4个字符,或2个字符的单词,我想要动态地分配,因为GetString可以获得任意长度的字符串,然后我可以使用strlen函数,来得到那个我传递的字符串,有多长?
应用推荐