1 00:00:00,180 --> 00:00:00,600 All right. 2 00:00:00,600 --> 00:00:01,380 Welcome back. 3 00:00:01,680 --> 00:00:08,310 So we've made it through a lot of string functions we've seen can cat and replace and substring and 4 00:00:08,310 --> 00:00:10,230 reverse and char add. 5 00:00:11,100 --> 00:00:15,900 We have two more that are combining into one video because they're really simple and straightforward 6 00:00:15,900 --> 00:00:17,220 and they're a natural pair. 7 00:00:17,580 --> 00:00:20,490 And then after we finish this, we have some fun exercises. 8 00:00:20,940 --> 00:00:23,700 So the two that we're looking at are upper and lower. 9 00:00:23,700 --> 00:00:25,770 And they do what they what they sound like. 10 00:00:25,770 --> 00:00:30,960 They change the case of a string so we can make something all caps or all lowercase letters. 11 00:00:31,200 --> 00:00:32,460 So let's take a look. 12 00:00:33,480 --> 00:00:35,490 What do you think this will do by now? 13 00:00:35,490 --> 00:00:40,170 You should be familiar with this select and then some string function. 14 00:00:40,440 --> 00:00:47,040 So select upper hello world is going to convert hello world to all caps. 15 00:00:48,090 --> 00:00:56,610 And just to prove that let's go over here and do it and we get hello world in all caps likewise select 16 00:00:56,610 --> 00:01:03,990 lower hello world will convert everything to be lowercase so it's really just the H and the W and we 17 00:01:03,990 --> 00:01:06,900 get hello world still don't believe me. 18 00:01:07,200 --> 00:01:08,610 Okay, there we go. 19 00:01:08,970 --> 00:01:09,840 Hello world. 20 00:01:10,200 --> 00:01:12,330 So honestly, that's pretty much it. 21 00:01:12,600 --> 00:01:14,580 Just like the other couple of videos before this. 22 00:01:14,580 --> 00:01:17,820 If you feel like that's good enough, go ahead, move on to the exercise. 23 00:01:17,820 --> 00:01:22,110 But if you want to see me, use it with some of our author data, stick around. 24 00:01:22,380 --> 00:01:27,990 So let's do something silly, like print out all book titles in all caps. 25 00:01:28,440 --> 00:01:36,960 So to do that, it's just a select upper title from books. 26 00:01:38,100 --> 00:01:38,880 And that's it. 27 00:01:40,220 --> 00:01:43,040 And of course we can combine it with other things. 28 00:01:43,640 --> 00:01:48,890 So we could do something like my favorite book is as if someone was yelling. 29 00:01:49,490 --> 00:01:54,080 My favorite book is and then a book name like The Namesake. 30 00:01:54,680 --> 00:01:59,210 And to do that, we need to combine the uppercase version. 31 00:01:59,210 --> 00:02:07,250 So I'll start writing it here, upper title, and we need to concatenate that with this string right 32 00:02:07,250 --> 00:02:16,270 here and to concatenate them kind of building backwards here, we need to use cat just like that so 33 00:02:16,270 --> 00:02:16,740 it can cat. 34 00:02:16,740 --> 00:02:22,640 And my favorite book is and we should add a space the, and then the uppercase version of title and 35 00:02:22,640 --> 00:02:26,960 then we'll just add a select can cat from books. 36 00:02:28,130 --> 00:02:31,400 So I kind of built that one in a different way, starting from the inside out. 37 00:02:32,120 --> 00:02:34,760 But you can see we get my favorite book is The Namesake. 38 00:02:35,240 --> 00:02:36,860 My favorite book is A Circle. 39 00:02:37,190 --> 00:02:40,580 My favorite book is O is the Cannery Row. 40 00:02:40,610 --> 00:02:40,840 Yeah. 41 00:02:40,910 --> 00:02:42,380 I'm not sure where I put the though there. 42 00:02:43,040 --> 00:02:43,640 Oops. 43 00:02:43,640 --> 00:02:49,100 Well anyways if we delete that extra the and rerun this 44 00:02:51,710 --> 00:02:57,350 now it's grammatically correct so that's pretty much it to upper and lower. 45 00:02:57,350 --> 00:03:02,840 I mean we could change this to be lower if I mean fine if you make me, I'll show it. 46 00:03:04,160 --> 00:03:09,980 I don't think there's any surprise about what will happen, but just in case, it just converts everything 47 00:03:10,010 --> 00:03:11,620 to lowercase OC. 48 00:03:11,840 --> 00:03:13,310 So that's upper and lower. 49 00:03:13,940 --> 00:03:16,910 That was a lot of stuff, all these different string functions we saw. 50 00:03:16,910 --> 00:03:19,850 Now it's time for you to get some practice doing it yourself.