All language subtitles for 1. Challenge 1 - Implementing strlen

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,330 --> 00:00:01,890 All right, welcome back, guys. 2 00:00:01,920 --> 00:00:08,670 So what we're going to do in these video is we're going to write a function of our own implementation 3 00:00:08,820 --> 00:00:11,010 to the Starland function. 4 00:00:11,400 --> 00:00:19,600 So we know that this function receives it receives so function that it receives receives a string. 5 00:00:19,630 --> 00:00:28,890 OK, and these function finds out, finds out and returns and returns the length of the string. 6 00:00:28,920 --> 00:00:32,160 OK, so the length of the string. 7 00:00:32,160 --> 00:00:38,700 And we know that it can be done very easily because you are a string in our C programming. 8 00:00:38,700 --> 00:00:44,940 Language is just an array of characters with the last character equals two backslash zero. 9 00:00:45,180 --> 00:00:51,840 So what we are going to do here is to write a function which is going to be of an integer type because 10 00:00:51,840 --> 00:00:56,300 we are looking for a lengthy shouldn't be of a floating point, of course. 11 00:00:56,340 --> 00:01:04,440 So end and let's call it the heartland exactly like we want to use it in our string, that H library. 12 00:01:04,450 --> 00:01:07,440 But this is going to be our own implementation. 13 00:01:07,440 --> 00:01:14,820 And these function is going to receive the address of the first element in this string, in this array 14 00:01:14,820 --> 00:01:15,640 of characters. 15 00:01:15,900 --> 00:01:19,630 So it's going to be Char Star and let's call it ETR. 16 00:01:19,650 --> 00:01:24,960 OK, so SDR will hold the address of the first element in the string. 17 00:01:24,960 --> 00:01:29,610 And since we know it's a sequence, it's going to iterate over it and find the length. 18 00:01:30,030 --> 00:01:36,810 Of course we could have used Heery const so that we will make sure that these function will not change 19 00:01:36,810 --> 00:01:37,620 SDR. 20 00:01:37,980 --> 00:01:45,300 But for now, since we are not so familiar with this, we simply are going to stick with this with this 21 00:01:45,300 --> 00:01:47,010 signature of the function. 22 00:01:47,040 --> 00:01:48,040 So there you go. 23 00:01:48,060 --> 00:01:49,630 Here is our Starland. 24 00:01:49,650 --> 00:01:52,170 So just copy it here and let's implement it. 25 00:01:52,170 --> 00:01:54,050 Very simple implementation. 26 00:01:54,450 --> 00:02:03,660 We are going to use and I and we are going to run over all of these string all all over this array of 27 00:02:03,660 --> 00:02:08,850 characters and find out where we find our first, let's say, backslash zero. 28 00:02:08,850 --> 00:02:09,220 Right. 29 00:02:09,240 --> 00:02:19,080 So while while ETR at Index Eye does not equal to backslash zero, OK, does not equal to this one, 30 00:02:19,440 --> 00:02:22,400 we are going to increment I by one. 31 00:02:22,410 --> 00:02:27,030 So I plus plus and every time we're going to incremented by one. 32 00:02:27,450 --> 00:02:35,550 And once we got here, once we, we found that our character is backslidden zero, then we know that 33 00:02:35,550 --> 00:02:44,640 we found also the size of these string and the size is going to be of course in inside of these I variable 34 00:02:44,640 --> 00:02:50,140 because I specifies the index as well as it's used to find the length. 35 00:02:50,670 --> 00:02:56,800 So in this case we are going to return EI, which is of the size of the string. 36 00:02:57,480 --> 00:02:59,360 So there you go. 37 00:02:59,490 --> 00:03:00,450 Very simple. 38 00:03:00,450 --> 00:03:09,270 Just sent the first address of the string, iterated over it to find where is the first element that 39 00:03:09,270 --> 00:03:16,620 is equal to zero, meaning at the end of the string use then I variable to find its length and then 40 00:03:16,620 --> 00:03:19,170 return I that's it guys. 41 00:03:19,260 --> 00:03:20,580 Not complicated. 42 00:03:20,640 --> 00:03:22,950 That's our implementation for the plan. 43 00:03:23,370 --> 00:03:26,000 And I hope you are proud of yourself. 44 00:03:26,010 --> 00:03:30,240 So thank you so much for watching and I'll see you in the next video. 45 00:03:30,360 --> 00:03:30,860 Bye bye. 4433

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