Afrikaans
Akan
Albanian
Amharic
Arabic
Armenian
Azerbaijani
Basque
Belarusian
Bemba
Bengali
Bihari
Bosnian
Breton
Bulgarian
Cambodian
Catalan
Cebuano
Cherokee
Chichewa
Chinese (Simplified)
Chinese (Traditional)
Corsican
Croatian
Czech
Danish
Dutch
English
Esperanto
Estonian
Ewe
Faroese
Filipino
Finnish
French
Frisian
Ga
Galician
Georgian
German
Greek
Guarani
Gujarati
Haitian Creole
Hausa
Hawaiian
Hebrew
Hindi
Hmong
Icelandic
Igbo
Indonesian
Interlingua
Irish
Italian
Japanese
Javanese
Kannada
Kazakh
Kinyarwanda
Kirundi
Kongo
Korean
Krio (Sierra Leone)
Kurdish
Kurdish (Soranî)
Kyrgyz
Laothian
Latin
Latvian
Lingala
Lithuanian
Lozi
Luganda
Luo
Luxembourgish
Macedonian
Malagasy
Malay
Malayalam
Maltese
Maori
Marathi
Mauritian Creole
Moldavian
Mongolian
Myanmar (Burmese)
Montenegrin
Nepali
Nigerian Pidgin
Northern Sotho
Norwegian
Norwegian (Nynorsk)
Occitan
Oriya
Oromo
Pashto
Persian
Polish
Portuguese (Brazil)
Portuguese (Portugal)
Punjabi
Quechua
Romanian
Romansh
Runyakitara
Russian
Samoan
Scots Gaelic
Serbian
Serbo-Croatian
Sesotho
Setswana
Seychellois Creole
Shona
Sindhi
Sinhalese
Slovak
Slovenian
Somali
Spanish
Spanish (Latin American)
Sundanese
Swahili
Swedish
Tajik
Tamil
Tatar
Telugu
Thai
Tigrinya
Tonga
Tshiluba
Tumbuka
Turkish
Turkmen
Twi
Uighur
Ukrainian
Urdu
Uzbek
Vietnamese
Welsh
Wolof
Xhosa
Yiddish
Yoruba
Zulu
All right, welcome back, guys.
So what we're going to do in these video is we're going to write a function of our own implementation
to the Starland function.
So we know that this function receives it receives so function that it receives receives a string.
OK, and these function finds out, finds out and returns and returns the length of the string.
OK, so the length of the string.
And we know that it can be done very easily because you are a string in our C programming.
Language is just an array of characters with the last character equals two backslash zero.
So what we are going to do here is to write a function which is going to be of an integer type because
we are looking for a lengthy shouldn't be of a floating point, of course.
So end and let's call it the heartland exactly like we want to use it in our string, that H library.
But this is going to be our own implementation.
And these function is going to receive the address of the first element in this string, in this array
of characters.
So it's going to be Char Star and let's call it ETR.
OK, so SDR will hold the address of the first element in the string.
And since we know it's a sequence, it's going to iterate over it and find the length.
Of course we could have used Heery const so that we will make sure that these function will not change
SDR.
But for now, since we are not so familiar with this, we simply are going to stick with this with this
signature of the function.
So there you go.
Here is our Starland.
So just copy it here and let's implement it.
Very simple implementation.
We are going to use and I and we are going to run over all of these string all all over this array of
characters and find out where we find our first, let's say, backslash zero.
Right.
So while while ETR at Index Eye does not equal to backslash zero, OK, does not equal to this one,
we are going to increment I by one.
So I plus plus and every time we're going to incremented by one.
And once we got here, once we, we found that our character is backslidden zero, then we know that
we found also the size of these string and the size is going to be of course in inside of these I variable
because I specifies the index as well as it's used to find the length.
So in this case we are going to return EI, which is of the size of the string.
So there you go.
Very simple.
Just sent the first address of the string, iterated over it to find where is the first element that
is equal to zero, meaning at the end of the string use then I variable to find its length and then
return I that's it guys.
Not complicated.
That's our implementation for the plan.
And I hope you are proud of yourself.
So thank you so much for watching and I'll see you in the next video.
Bye bye.
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.