1
00:00:00,550 --> 00:00:05,450
So as you can see here these are the lines of code that I pasted here.

2
00:00:05,590 --> 00:00:11,770
So as you can see there at the Axis modifier of the Smurfette is actually private then the data type

3
00:00:11,980 --> 00:00:17,750
actually the return value of this movie is going to be off type streamed and the name of this method

4
00:00:17,800 --> 00:00:20,590
is get the exact animal name.

5
00:00:20,800 --> 00:00:26,750
And this method accepts an argument of type string and the name of this argument is animal named.

6
00:00:26,860 --> 00:00:32,050
So now let's actually go inside the curly braces of the Smurfette And let's see what's going on here.

7
00:00:32,260 --> 00:00:38,950
So because this Smurfette needs to return a value of type streambed I just put the return key word here

8
00:00:39,220 --> 00:00:44,970
and then I refer to the name of this argument name as you can see animal name that substring.

9
00:00:45,190 --> 00:00:51,520
So it's going to give us a substring of a string value that you pass through the substring method so

10
00:00:51,700 --> 00:00:52,820
that's substring.

11
00:00:52,990 --> 00:00:55,890
And as you can see here if we put this piece of code here.

12
00:00:56,110 --> 00:01:01,670
So now let me show you what is this animal name that index of.

13
00:01:01,960 --> 00:01:06,410
And as you can see here inside the prentices and inside the coats we have dash.

14
00:01:06,640 --> 00:01:12,040
So now let me show you the structure of the project because I want to show you our real important point

15
00:01:12,040 --> 00:01:12,610
here.

16
00:01:12,640 --> 00:01:19,190
So just click kind of view tool windows and then project and Dan are here as you can see inside this

17
00:01:19,190 --> 00:01:23,410
assets folder and inside these tame animals there as he has here.

18
00:01:23,410 --> 00:01:25,980
These are the odd animal names right.

19
00:01:26,200 --> 00:01:28,730
But here let's look at this image here.

20
00:01:28,850 --> 00:01:34,270
Tim underline any man's dash floppy underline bird.

21
00:01:34,330 --> 00:01:37,390
So let me show you the quiz here.

22
00:01:37,390 --> 00:01:43,540
As you can see so for example here as you can see for this button for this what it takes you can see

23
00:01:43,540 --> 00:01:51,000
this flappy bird didn't actually change the font of our quiz for example to chant 5.

24
00:01:51,310 --> 00:01:53,840
And now let me click on back.

25
00:01:53,860 --> 00:01:59,380
So now let me change this question to another question so that we can see the flappy bird.

26
00:01:59,380 --> 00:02:03,460
So as you can see here here we have the Spartan and it takes it.

27
00:02:03,460 --> 00:02:04,950
Flappy bird is here.

28
00:02:05,230 --> 00:02:11,300
So we get this text from our image names here inside our asset folder.

29
00:02:11,440 --> 00:02:18,830
But as you can see here inside our tank on the line animals here you can see that we have a floppy underline

30
00:02:19,030 --> 00:02:19,670
bird.

31
00:02:20,020 --> 00:02:22,730
And how come we have this value here.

32
00:02:22,810 --> 00:02:24,330
Floppy spaceport.

33
00:02:24,330 --> 00:02:26,290
Where is that on the line here.

34
00:02:26,560 --> 00:02:30,700
So that's because of this method that we actually created here.

35
00:02:30,820 --> 00:02:36,160
We actually created an effort here in order to actually eliminate that underline here so that we can

36
00:02:36,160 --> 00:02:42,610
actually show this flappy bird here so that the user can actually better see this value.

37
00:02:42,610 --> 00:02:46,390
So as you can see animal name that substring.

38
00:02:46,510 --> 00:02:50,730
And then I again refer to the name of this animal name that index of dash.

39
00:02:50,920 --> 00:02:56,610
So indexed of dash means that it may actually show the destructive structure of the project indexed

40
00:02:56,740 --> 00:02:59,120
ASH is the index that does exist.

41
00:02:59,140 --> 00:03:04,980
As you can see here in this structure of the Project for example this flappy bird came under Line animals

42
00:03:05,380 --> 00:03:07,330
tame underlain animals dash.

43
00:03:07,570 --> 00:03:15,550
So this is that index plus 1 means the index after dash after that that means right.

44
00:03:15,700 --> 00:03:22,120
So index of Dash is this one plus one means the index after this dash dot.

45
00:03:22,360 --> 00:03:30,100
Or replace as you can see here that replace underline with are with actually an empty value as you can

46
00:03:30,100 --> 00:03:33,160
see here with our space right.

47
00:03:33,290 --> 00:03:36,970
Replace underlined with a space as you can see here.

48
00:03:37,120 --> 00:03:39,030
So it's going to actually delete that underline.

49
00:03:39,060 --> 00:03:45,790
And when you read it when I don't want to actually show this flappy bird here to the user as you can

50
00:03:45,790 --> 00:03:48,260
see that underline does not exist.

51
00:03:48,400 --> 00:03:53,480
And that's because of this a piece of code here that's because of this line of code here.

52
00:03:53,660 --> 00:03:55,700
Anyone named that substrings.

53
00:03:56,110 --> 00:04:02,650
So it's going to give us only a portion of this thing to do from the Smurfette that and that's the job

54
00:04:02,650 --> 00:04:06,810
of the substring animal name that index of dash.

55
00:04:07,360 --> 00:04:13,130
So the index of that is the index here plus one means the value after the stash.

56
00:04:13,140 --> 00:04:14,530
OK Plus what if.

57
00:04:14,860 --> 00:04:20,200
And then it going actually look at these characters and it's going to find these underline and it's

58
00:04:20,200 --> 00:04:23,080
going to actually replace underline with our space here.

59
00:04:23,110 --> 00:04:26,250
As you can see so hopefully that makes sense.

60
00:04:26,410 --> 00:04:28,190
And that's the job of the Smurfette.

61
00:04:28,200 --> 00:04:33,100
And if you actually scroll through the top here as you can see we used this Meffert here to get the

62
00:04:33,100 --> 00:04:39,250
exact animal name here in line number one hundred than eleven in order to actually been able to for

63
00:04:39,250 --> 00:04:43,320
example show the use of the correct answer then it's gone.

64
00:04:43,330 --> 00:04:49,930
It's not going to actually use that underlying character is going to just put that animal in here at

65
00:04:49,930 --> 00:04:50,640
the bottom.

66
00:04:51,490 --> 00:04:53,580
So hopefully that makes sense.

67
00:04:53,830 --> 00:04:59,640
And now you can understand the job of this method and why we actually created this method.

68
00:04:59,830 --> 00:05:05,260
So not really to actually create other effects to for example as you can see we need to create these

69
00:05:05,270 --> 00:05:11,730
Able quis spottiness in order to disable our craziest patterns so that that actually creates that method

70
00:05:11,740 --> 00:05:12,340
here.

71
00:05:12,340 --> 00:05:17,620
So after the end in Cur-Lee place of this get the exact animal name effort I'm going to pasting some

72
00:05:17,620 --> 00:05:21,960
lines of code here and then I'm going to explain to you what's going on here.

