Hello and welcome to the Golang programming language course.
In the previous session, we talked about concatenating extremes.
And in this session, we want to talk about the other Asterix concept.
Go Blank contains function, you can search a particular text or string or character within a string
by using contains fonts.
It returns output food either true or false.
Now you can see the syntax.
If Sylvester Estrin found in SS training, then it returns true.
And if soviet-style restraint is not found in a stream bin in three turns false.
Now, let's go to this school program to illustrate how to use contains functional strength.
For example, we want to check, is there an AUC value within the Australia extreme or not?
So right, FP?
Used a string spike and invoke contains function.
So for its history or for first variable, we said Australia
and for second string, we set a U.
S.
Doing another sandpit we want to check is there are string by operators in Germany, a string that first
character is staffed by operatives and our characters are lowercase.
So we tried FP.
Estimates Package Select contains functions and sit for first lady to Germany and for second let it
be said G-8 are by outrageous do and other Sampat and we want to check airspace.
So right, if the strings start contains airspace for first variable and space for second and as at
least sample, we want to check is there one a string in a two three string?
So right, if the strings start contains, for the example, one to three for First Lady Bird and for
Second Lady Bird, we said one reformat the code, save the project and execute the program.
Now we can see the output in the first example.
The result is true because there is an AUSA value inside Australia, and in the second example, the
Germany string does not have a gear stream because all the characters in arresting are capitalized.
But the German is sitting is only its first character is arteritis, and it is case sensitive and the
result is false.
And in the third sample space, also consider as extreme and the result is true.
And in the last sandpit, we see that string one is inside a string one two three and the value of trees
returned in order not to prolong the time of decision.
We will finish it and we will continue with the content in the next session.
Goodbye.