All language subtitles for 9. Lets INTRODUCE stringh!

af Afrikaans
sq Albanian
am Amharic
ar Arabic
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bn Bengali
bs Bosnian
bg Bulgarian
ca Catalan
ceb Cebuano
ny Chichewa
zh-CN Chinese (Simplified)
zh-TW Chinese (Traditional)
co Corsican
hr Croatian
cs Czech
da Danish
nl Dutch
en English
eo Esperanto
et Estonian
tl Filipino
fi Finnish
fr French
fy Frisian
gl Galician
ka Georgian
de German
el Greek
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian Download
is Icelandic
ig Igbo
id Indonesian
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
km Khmer
ko Korean
ku Kurdish (Kurmanji)
ky Kyrgyz
lo Lao
la Latin
lv Latvian
lt Lithuanian
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mn Mongolian
my Myanmar (Burmese)
ne Nepali
no Norwegian
ps Pashto
fa Persian
pl Polish
pt Portuguese
pa Punjabi
ro Romanian
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
st Sesotho
sn Shona
sd Sindhi
si Sinhala
sk Slovak
sl Slovenian
so Somali
es Spanish
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
te Telugu
th Thai
tr Turkish
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu
or Odia (Oriya)
rw Kinyarwanda
tk Turkmen
tt Tatar
ug Uyghur
Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated: 1 00:00:00,150 --> 00:00:03,120 Welcome back to our Recy programming course. 2 00:00:03,490 --> 00:00:09,990 And in this video, what we are going to do is we are going to talk about the string that H library, 3 00:00:10,120 --> 00:00:14,490 and although in these course we do not learn how to create our own libraries. 4 00:00:14,870 --> 00:00:23,100 Yet it's important for us to understand, at least it's to some extent how to use already built in libraries 5 00:00:23,100 --> 00:00:28,170 and how we can take different functionalities and use them inside of our program. 6 00:00:28,290 --> 00:00:33,960 So this Thring library basically provides you with a lot of functionality that you can apply in strings. 7 00:00:34,080 --> 00:00:39,470 And since there are a lot of functions that are being used on strings, most of them we can find out, 8 00:00:39,480 --> 00:00:43,170 the most used ones we can find out in this library. 9 00:00:43,440 --> 00:00:47,250 So simply take them and use them to whatever needs you need. 10 00:00:47,370 --> 00:00:53,310 So some of the functionality that this library provides is finding the length of a given string. 11 00:00:53,370 --> 00:00:53,700 OK. 12 00:00:53,880 --> 00:00:59,910 We've already seen how to write the function that finds the length of a given string in in one of her 13 00:00:59,910 --> 00:01:01,020 previous challenges. 14 00:01:01,450 --> 00:01:07,740 And now what we want to do is to use this function that somebody else has written for us. 15 00:01:08,040 --> 00:01:12,610 And it's stored inside of this library, inside of this string, that age. 16 00:01:12,750 --> 00:01:17,820 And it's been called by SDR Orlan, meaning string length. 17 00:01:18,240 --> 00:01:22,980 So you basically you just you don't have to develop this function on your own. 18 00:01:23,250 --> 00:01:24,570 You can simply use it. 19 00:01:24,900 --> 00:01:31,650 And these function basically will give you the length of a given string, just like we've done in previous 20 00:01:31,650 --> 00:01:32,130 challenges. 21 00:01:32,160 --> 00:01:33,510 The same goes here. 22 00:01:34,020 --> 00:01:36,460 Just take it from the string that each library. 23 00:01:36,570 --> 00:01:37,650 So I hope that's clear. 24 00:01:37,710 --> 00:01:37,920 OK. 25 00:01:38,160 --> 00:01:44,400 Also, another common function called the copying function, the copying content and these functions. 26 00:01:44,430 --> 00:01:52,410 Simply what it does is taking one string and copying it into some other location, into some other string. 27 00:01:52,500 --> 00:01:55,590 We also have functionality of the concatenating. 28 00:01:55,620 --> 00:02:03,390 We can concatenate one string to the end of another string by using the SDR acat function. 29 00:02:03,570 --> 00:02:09,390 And also we have a function to compare between strings using the SDR CMB function. 30 00:02:09,840 --> 00:02:11,440 So these are the same. 31 00:02:11,700 --> 00:02:17,100 Some of the main functions that we are going to talk about in this video and we will explain each of 32 00:02:17,100 --> 00:02:21,360 them and understand how and when basically we can use them. 33 00:02:22,230 --> 00:02:26,790 And the first one that we are going to talk about is the SDR land function. 34 00:02:27,030 --> 00:02:33,510 So what these function does, this function is actually in charge of finding out the lengths of a given 35 00:02:33,510 --> 00:02:34,140 string. 36 00:02:34,590 --> 00:02:39,300 It's implemented in a similar way to the function we've written in one of our previous challenges. 37 00:02:39,630 --> 00:02:43,460 It's gets it gets a string and returns its length. 38 00:02:43,710 --> 00:02:51,600 Or better say it returns the number of characters until the first backslash, the euro or null character. 39 00:02:51,720 --> 00:02:57,030 So for a given string, we will sum up all the characters until we reach the null character. 40 00:02:57,300 --> 00:02:58,590 I hope that makes sense to you. 41 00:02:58,830 --> 00:03:03,810 So if, for example, we will have a string, for example, it contains my name Vlad. 42 00:03:03,840 --> 00:03:04,220 OK. 43 00:03:04,680 --> 00:03:11,310 So the string can be represented in memory like an array of characters with characters V, L, a, d 44 00:03:11,670 --> 00:03:15,210 and at the end of course we add the null character. 45 00:03:15,240 --> 00:03:15,450 OK. 46 00:03:15,500 --> 00:03:18,600 Because we use a string in our C language. 47 00:03:19,050 --> 00:03:23,090 That's how the string actually resides in the memory of your computer. 48 00:03:23,370 --> 00:03:26,820 If you open up your computer as a memory and take a look. 49 00:03:27,090 --> 00:03:29,790 This is exactly how it's going to be stored. 50 00:03:29,960 --> 00:03:36,690 And now if we apply the SDR land function on this string, the Lancs that is going to be returned from 51 00:03:36,690 --> 00:03:41,340 this function is simply for which is the actual length of this string. 52 00:03:41,370 --> 00:03:46,300 We didn't include the Baxley's zero because it's not actually a part of the name. 53 00:03:46,350 --> 00:03:46,510 OK. 54 00:03:46,590 --> 00:03:51,210 It's just ah, an addition that we using our string. 55 00:03:51,540 --> 00:03:53,460 So that's how these function works. 56 00:03:53,670 --> 00:04:00,390 You simply provide this function with a string and it returns to the length of the string until the 57 00:04:00,390 --> 00:04:02,250 first now character. 58 00:04:02,850 --> 00:04:07,830 Now let's take a look at a simple example with a couple of usages of this function. 59 00:04:07,980 --> 00:04:09,630 And this code goes like this. 60 00:04:09,840 --> 00:04:12,640 First of all, we will create a string, OK? 61 00:04:12,720 --> 00:04:14,160 We will initialize a string. 62 00:04:14,170 --> 00:04:16,170 And this range is called name. 63 00:04:16,200 --> 00:04:19,140 And of course, that's how it's represented in memory. 64 00:04:19,340 --> 00:04:24,960 And now once we have our string, what we are going to do is simply to print the length of the string. 65 00:04:25,020 --> 00:04:27,630 Just by using this is the Erlend function. 66 00:04:27,840 --> 00:04:35,100 So print f name, length percentage the end instead of these percentage, the we are going to call the 67 00:04:35,100 --> 00:04:36,300 SDR land function. 68 00:04:36,630 --> 00:04:42,450 And to give it as a parameter of the name and then the result, the expected the result of course is 69 00:04:42,450 --> 00:04:46,860 going to be name length is just four characters. 70 00:04:47,010 --> 00:04:48,190 So I hope that's clear. 71 00:04:48,190 --> 00:04:49,220 And that's how you use this. 72 00:04:49,340 --> 00:04:49,870 You're plan. 73 00:04:50,430 --> 00:04:53,760 And now we are ready to move on to the next function. 74 00:04:53,790 --> 00:04:58,500 And this function is asked the R c.p, why ista are a copy? 75 00:04:58,590 --> 00:04:59,910 So we know that if we. 76 00:04:59,990 --> 00:05:02,250 Want to copy one a rating to another? 77 00:05:02,310 --> 00:05:08,010 We should basically use some loop and go over each of the elements of the source array and simply copy 78 00:05:08,010 --> 00:05:10,680 them one by one to the target array. 79 00:05:10,800 --> 00:05:15,060 And since we know that a string is considered to be an array of characters. 80 00:05:15,390 --> 00:05:18,990 These copying operation is expected to be pretty much the same. 81 00:05:18,990 --> 00:05:19,350 Right. 82 00:05:19,500 --> 00:05:26,370 Simply to iterate over the source string and to copy element by element to the target string. 83 00:05:26,490 --> 00:05:27,940 That's how you expect to do it. 84 00:05:28,110 --> 00:05:32,090 But instead of making it so complicated, we can use the SDR recipe. 85 00:05:32,160 --> 00:05:32,970 Why function? 86 00:05:33,240 --> 00:05:38,790 That simply is responsible for copying the content of one string into another. 87 00:05:38,940 --> 00:05:41,610 And this function basically has two parameters. 88 00:05:41,700 --> 00:05:45,750 The first one is the destination string where we want to copy to. 89 00:05:45,900 --> 00:05:51,540 And the second one is the source Thring, which is the source Thring that we want to copy in our case 90 00:05:51,540 --> 00:05:53,400 is just it's just my name flood. 91 00:05:53,520 --> 00:05:59,580 So now when you call the function of the source string, which is s the R one will basically be copied 92 00:05:59,610 --> 00:06:04,340 into the destination string, which is in this case, just SDR two. 93 00:06:04,500 --> 00:06:06,480 So that's how you use a copy string. 94 00:06:06,810 --> 00:06:08,010 Very simple, guys. 95 00:06:08,040 --> 00:06:09,150 Nothing complicated. 96 00:06:10,740 --> 00:06:12,300 Let's see how it looks in code. 97 00:06:12,330 --> 00:06:12,610 OK. 98 00:06:13,020 --> 00:06:18,610 So now we are going to take a look at how we, first of all, initialize an array. 99 00:06:18,750 --> 00:06:21,930 A string is the R one a D. 100 00:06:22,020 --> 00:06:23,150 That's my name, Vlad. 101 00:06:23,580 --> 00:06:27,730 And then we're also going to declare it just to create another string. 102 00:06:27,750 --> 00:06:30,610 Guess the Rs2 in it will be of size 10. 103 00:06:30,780 --> 00:06:31,070 OK. 104 00:06:31,130 --> 00:06:32,420 It will be of size then. 105 00:06:32,940 --> 00:06:40,650 And now what we are going to do is we are going to use the SDR, S.P. y function into copy, into my 106 00:06:40,650 --> 00:06:42,670 name, into SDR too. 107 00:06:42,720 --> 00:06:48,570 OK, so after these function is over inside of us, the Rs2 there is going to reside. 108 00:06:48,840 --> 00:06:50,550 My name is also going to be there. 109 00:06:50,670 --> 00:06:53,400 And now what we are going to do is just to make sure of it. 110 00:06:53,880 --> 00:06:55,650 This function worked correctly. 111 00:06:55,650 --> 00:06:59,830 So print Agfest the R one equals two percentages and SDR one. 112 00:06:59,910 --> 00:07:03,410 That's how we print our strength on the screen. 113 00:07:03,420 --> 00:07:04,800 You already know it by now. 114 00:07:04,920 --> 00:07:06,450 And also we can use this. 115 00:07:06,450 --> 00:07:12,510 The R two equals two percent just to print the SDR two to make sure that the copying operation worked. 116 00:07:12,590 --> 00:07:17,580 OK, so the expected result we can see here is the R one equals two. 117 00:07:17,580 --> 00:07:19,580 Vlad is the R two equals two, Vlad. 118 00:07:19,870 --> 00:07:28,710 That's how we copied a string without using any loops, without using anything on complicating all of 119 00:07:28,710 --> 00:07:32,220 this operation and making our code more clean. 120 00:07:32,550 --> 00:07:39,630 And just by using one function, we copied all all this source string into the destination string. 121 00:07:39,690 --> 00:07:40,830 So I hope that's clear. 122 00:07:41,130 --> 00:07:46,980 So now if we want to summarize a little bit what s the R.S.V.P. y function does and how it works, we 123 00:07:46,980 --> 00:07:54,360 can say that it's the RCP y simply gets as the first parameter of the address of the destination string 124 00:07:54,540 --> 00:07:57,120 the place where we are going to copy to. 125 00:07:57,480 --> 00:08:05,580 And does the second parameter of the RCMP y will get the address where resides the source string, the 126 00:08:05,580 --> 00:08:12,510 string that we should copy, and a couple of nodes that you should bear in mind when using this function 127 00:08:12,990 --> 00:08:19,650 is that it's your responsibility as the developer to make sure that there is enough memory in the destination 128 00:08:19,650 --> 00:08:22,200 string to hold the source string. 129 00:08:22,740 --> 00:08:25,020 So make sure you check it out before copying. 130 00:08:25,200 --> 00:08:31,740 Otherwise, some problems are expected to be only detected at runtime and nothing in the compilation 131 00:08:31,740 --> 00:08:37,210 phase because you see, the compiler will not warn you about these type of problems. 132 00:08:37,260 --> 00:08:43,410 If you if the destination's thing does not have enough memory to hold the source Thring and it will 133 00:08:43,410 --> 00:08:48,690 try to override some memory that does not belong to your program if that's the case. 134 00:08:49,230 --> 00:08:51,210 So you don't want to let this happen. 135 00:08:51,750 --> 00:08:55,980 So another note is that, first of all, is the enough memory. 136 00:08:55,980 --> 00:09:04,110 And the second note is that the copy function is done only up to the first null character in the source 137 00:09:04,110 --> 00:09:04,470 Thring. 138 00:09:04,500 --> 00:09:12,870 So if the source Thring, I don't know, we zae, let's say 20 characters, but we have inside of this 139 00:09:13,340 --> 00:09:14,130 Saura string. 140 00:09:14,190 --> 00:09:21,510 We have two two instances of the null character, let's say null character ID index nine and null character 141 00:09:21,510 --> 00:09:23,070 at Indexed 20, for example. 142 00:09:23,310 --> 00:09:30,300 So this is the R.S.V.P. Y has the R.S.V.P. y function will only copy the string up until this first 143 00:09:30,300 --> 00:09:31,290 null character. 144 00:09:31,680 --> 00:09:34,530 So that's important that you will bear this in mind. 145 00:09:34,950 --> 00:09:40,860 And last note about the SDR, S.P. y function is what these function returns. 146 00:09:41,190 --> 00:09:44,600 And basically what it returns is the copied string. 147 00:09:44,640 --> 00:09:52,680 So although SDR two will have will have the new string as the R.S.V.P. y by default it will return. 148 00:09:52,710 --> 00:09:52,940 OK. 149 00:09:53,040 --> 00:09:56,310 You may either accept its return, the result or not. 150 00:09:56,340 --> 00:09:57,600 That's, that's up to you. 151 00:09:57,870 --> 00:09:59,700 But it will return of the. 152 00:09:59,890 --> 00:10:02,720 Rest of the new string where it resides. 153 00:10:02,870 --> 00:10:07,640 So be aware of that and you may use it for your needs whenever you like. 154 00:10:07,730 --> 00:10:08,390 All right. 155 00:10:08,400 --> 00:10:12,770 So now let's talk about the next function in our string, the Ridge library. 156 00:10:13,160 --> 00:10:17,990 And that's a political function called Ask the are cat or cat. 157 00:10:18,110 --> 00:10:23,720 So what this function basically does is simply to concatenate one string to the end of the other. 158 00:10:24,140 --> 00:10:30,710 So the first parameter of this function gets the destination string and the second parameter is the 159 00:10:30,710 --> 00:10:31,610 source string. 160 00:10:31,760 --> 00:10:38,450 And what we will do is simply to take the source string and to add it to the end of the destination 161 00:10:38,450 --> 00:10:38,900 string. 162 00:10:39,050 --> 00:10:39,860 Is that clear? 163 00:10:40,310 --> 00:10:43,910 We will kind of joy in these two strings into one. 164 00:10:43,940 --> 00:10:50,240 OK, we'll take the destination string and the source string, meaning SDR one, an SDR two, and simply 165 00:10:50,240 --> 00:10:53,300 combine them at the SDR to the source. 166 00:10:53,300 --> 00:10:55,940 Think to the end of the destination's three. 167 00:10:56,150 --> 00:10:57,250 So we have one string. 168 00:10:57,290 --> 00:10:58,720 Let's see some code examples. 169 00:10:58,730 --> 00:11:00,980 So if once three years, let's say hello. 170 00:11:01,430 --> 00:11:05,300 And the other is the other string is world. 171 00:11:05,630 --> 00:11:12,570 So if we simply take and concatenate them, we use the SDR can't function the SDR card. 172 00:11:13,190 --> 00:11:16,280 So the SDR destination is the first parameter. 173 00:11:16,310 --> 00:11:18,440 The SDR source is the second parameter. 174 00:11:18,680 --> 00:11:26,270 And then you simply concatenate them and afterwords you will get one string joined together with the 175 00:11:26,270 --> 00:11:29,330 with the whole sentence of Hello World. 176 00:11:29,960 --> 00:11:37,280 And this sentence is going to be stored inside of SDR, destination K of it will be appended to the 177 00:11:37,280 --> 00:11:37,640 end of it. 178 00:11:37,880 --> 00:11:40,050 So if we will use the print off-line. 179 00:11:40,070 --> 00:11:44,110 So let's use print F string after a contact concatenation. 180 00:11:45,200 --> 00:11:46,640 Is percentage asked. 181 00:11:46,760 --> 00:11:52,490 And instead of these percentages, we are going to replace that with the SDR destination. 182 00:11:52,610 --> 00:11:58,310 What we are going to see printed out on the screen, the result is going to be hello world. 183 00:11:58,460 --> 00:12:04,980 So simply adding one string to the end of the other and creating one bigger and longer string. 184 00:12:05,390 --> 00:12:09,110 And the notes here are pretty much the same as previously. 185 00:12:09,380 --> 00:12:16,360 You simply concatenate the SDR source only up to the first are only up until you reach some first null 186 00:12:16,370 --> 00:12:17,090 character. 187 00:12:17,630 --> 00:12:24,350 Also, make sure that the SDR destination has enough memory to hold both strings after a concatenation. 188 00:12:24,650 --> 00:12:30,410 So that's why here on the right you can see that we initialized and we declared, first of all, the 189 00:12:30,410 --> 00:12:32,950 SDR destination of sice 20. 190 00:12:33,140 --> 00:12:34,590 So it will be sufficient. 191 00:12:34,590 --> 00:12:37,460 And so there will be sufficient memory. 192 00:12:37,580 --> 00:12:43,190 There will be enough memory to hold also the hello world and the world mass. 193 00:12:43,400 --> 00:12:45,050 The world, the war itself. 194 00:12:45,100 --> 00:12:45,390 OK. 195 00:12:45,830 --> 00:12:51,640 So there will be enough memory to hold both of these strings in the SDR, this Diggnation. 196 00:12:51,830 --> 00:12:57,050 And just to demonstrate this concatenation process once again. 197 00:12:57,320 --> 00:13:01,160 So SDR destination, first of all, has the word hello. 198 00:13:01,430 --> 00:13:01,710 OK. 199 00:13:01,790 --> 00:13:02,300 Hello. 200 00:13:02,330 --> 00:13:05,560 H e l l o and a space after words. 201 00:13:05,960 --> 00:13:08,720 And of course there is a backslash zero with the end of it. 202 00:13:09,080 --> 00:13:16,310 And during the concatenation, this function, this SDR acat, what it does is simply overwrite this 203 00:13:16,370 --> 00:13:20,180 backslash zero at the end is null character with the end of the hello world. 204 00:13:21,500 --> 00:13:26,900 And wards it takes the world and it places it right after the hello. 205 00:13:27,230 --> 00:13:32,540 And it adds are only the backslash zero to the end of the concatenate string. 206 00:13:32,600 --> 00:13:38,220 So it creates a new string with a backslash zero at the end of it, just as we expect. 207 00:13:38,660 --> 00:13:42,740 And now to the last function that we are going to talk about in this video. 208 00:13:42,890 --> 00:13:45,900 And this function is called SDR, CMB. 209 00:13:46,100 --> 00:13:50,330 All these function does is just the lexical graphical comparison. 210 00:13:50,390 --> 00:13:53,360 It's just compares between two strings. 211 00:13:53,840 --> 00:13:58,820 And if you guys are not familiar with this term, simply think about it like you. 212 00:13:58,830 --> 00:14:02,180 You're looking for two words in a dictionary. 213 00:14:02,330 --> 00:14:06,170 So in every dictionary, the words appearing some organized manner. 214 00:14:06,200 --> 00:14:06,560 Right. 215 00:14:07,040 --> 00:14:11,290 First you have over the words, starting with the letter A, then B and so. 216 00:14:11,780 --> 00:14:14,300 They are organized in some structure. 217 00:14:14,930 --> 00:14:21,350 So lexicographical comparison simply means that if you take two words, two strings in our case and 218 00:14:21,350 --> 00:14:26,000 look for them in the dictionary, you would like to know which one of them would come first and which 219 00:14:26,000 --> 00:14:28,040 one of them would come the second. 220 00:14:28,310 --> 00:14:31,250 So with the first string, we have two strings, right? 221 00:14:31,700 --> 00:14:37,160 If the first thing is going to be placed before the second string. 222 00:14:37,190 --> 00:14:42,060 If we take a look at this dictionary and we see that the first string comes before the second. 223 00:14:42,160 --> 00:14:44,670 OK, so let's say it has a B.A.. 224 00:14:44,690 --> 00:14:50,720 The first thing and the second string is a B, so ABH is definitely the first string and it will come 225 00:14:50,720 --> 00:14:52,130 before the second one. 226 00:14:52,310 --> 00:14:54,410 So if that's the case, this function. 227 00:14:54,450 --> 00:14:58,460 This is the RCMP will simply return minus one. 228 00:14:59,000 --> 00:14:59,660 And if. 229 00:14:59,890 --> 00:15:07,390 Opposite than the function, if its opposite, meaning that the first ring was a beeby and the second 230 00:15:07,390 --> 00:15:09,470 string was a, B, a.. 231 00:15:09,550 --> 00:15:09,850 OK. 232 00:15:10,240 --> 00:15:15,070 So in this case, the three and the function is going to return plus one. 233 00:15:15,430 --> 00:15:18,280 And if both of the rings are identical. 234 00:15:18,340 --> 00:15:19,180 So the yes. 235 00:15:19,180 --> 00:15:21,750 The RCMP will return zero. 236 00:15:21,850 --> 00:15:24,980 So I know it may be confusing a little bit at this time. 237 00:15:25,010 --> 00:15:28,000 So let's take another look at another example. 238 00:15:28,240 --> 00:15:32,400 And let's say if we have two strings and the first one is my. 239 00:15:32,440 --> 00:15:34,180 And the second one is Mike. 240 00:15:34,240 --> 00:15:38,200 OK, and we use the s the RCMP on both of these strings. 241 00:15:38,230 --> 00:15:40,570 So the first parameter is string one. 242 00:15:40,600 --> 00:15:41,920 The second one is string two. 243 00:15:42,250 --> 00:15:47,500 So this function for this combination of strings will return minus one. 244 00:15:47,530 --> 00:15:56,170 So we know that the string one is kind of less than string two, it will appear before in the lexicographical 245 00:15:56,170 --> 00:15:56,650 manner. 246 00:15:56,770 --> 00:16:03,070 But if we would specify the string to as the first parameter and string to one as the second a parameter, 247 00:16:03,070 --> 00:16:08,050 until I tell you the argument, then the function is going to return plus one. 248 00:16:08,650 --> 00:16:10,270 And if both of them. 249 00:16:10,380 --> 00:16:15,940 Of if both of the strings were, let's say, Michael K String doing string to both of the strings were 250 00:16:15,940 --> 00:16:16,370 Mike. 251 00:16:16,390 --> 00:16:20,380 We if we want to see if one string equals to another string. 252 00:16:20,710 --> 00:16:24,940 So this function in this case will return just zero. 253 00:16:25,030 --> 00:16:30,460 So I hope that's clear, guys, because all these function does is simply to compare between two strings 254 00:16:30,460 --> 00:16:37,510 and to let you know are some rules about which string is kind of bigger and which string is kind of 255 00:16:37,510 --> 00:16:41,770 smaller in which one will appear before the other. 256 00:16:42,040 --> 00:16:50,790 In some dictionary and basically in most of the times, what's most interesting here is the results 257 00:16:50,790 --> 00:16:51,580 of the S2. 258 00:16:51,640 --> 00:16:58,240 RCMP will return zero because if it returns zero, then we know that both strings are the same. 259 00:16:58,540 --> 00:17:01,090 Otherwise, we know they are not the same. 260 00:17:01,120 --> 00:17:06,630 So most of the time, that's why when you would like to use this function. 261 00:17:06,910 --> 00:17:09,350 So I guess this is it for this video, guys. 262 00:17:09,610 --> 00:17:10,990 Thank you so much for watching. 263 00:17:11,020 --> 00:17:15,670 That was not an easy not an easy video, not an easy lesson. 264 00:17:15,790 --> 00:17:22,480 We learned a couple of functions that are being used that we can use in from the string that H library. 265 00:17:22,810 --> 00:17:29,650 And actually there are a lot of additional functions that you can find out by yourself or ask me probably 266 00:17:29,650 --> 00:17:35,650 to make some summary for you that you will be much more easier to you, but also try to trade on your 267 00:17:35,650 --> 00:17:35,920 own. 268 00:17:35,980 --> 00:17:37,450 That's that's also important. 269 00:17:37,570 --> 00:17:40,000 So, as always, thank you so much for watching. 270 00:17:40,000 --> 00:17:41,840 And I'll see you in the next video. 25937

Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.