All right.
Welcome back.
So we've made it through a lot of string functions we've seen can cat and replace and substring and
reverse and char add.
We have two more that are combining into one video because they're really simple and straightforward
and they're a natural pair.
And then after we finish this, we have some fun exercises.
So the two that we're looking at are upper and lower.
And they do what they what they sound like.
They change the case of a string so we can make something all caps or all lowercase letters.
So let's take a look.
What do you think this will do by now?
You should be familiar with this select and then some string function.
So select upper hello world is going to convert hello world to all caps.
And just to prove that let's go over here and do it and we get hello world in all caps likewise select
lower hello world will convert everything to be lowercase so it's really just the H and the W and we
get hello world still don't believe me.
Okay, there we go.
Hello world.
So honestly, that's pretty much it.
Just like the other couple of videos before this.
If you feel like that's good enough, go ahead, move on to the exercise.
But if you want to see me, use it with some of our author data, stick around.
So let's do something silly, like print out all book titles in all caps.
So to do that, it's just a select upper title from books.
And that's it.
And of course we can combine it with other things.
So we could do something like my favorite book is as if someone was yelling.
My favorite book is and then a book name like The Namesake.
And to do that, we need to combine the uppercase version.
So I'll start writing it here, upper title, and we need to concatenate that with this string right
here and to concatenate them kind of building backwards here, we need to use cat just like that so
it can cat.
And my favorite book is and we should add a space the, and then the uppercase version of title and
then we'll just add a select can cat from books.
So I kind of built that one in a different way, starting from the inside out.
But you can see we get my favorite book is The Namesake.
My favorite book is A Circle.
My favorite book is O is the Cannery Row.
Yeah.
I'm not sure where I put the though there.
Oops.
Well anyways if we delete that extra the and rerun this
now it's grammatically correct so that's pretty much it to upper and lower.
I mean we could change this to be lower if I mean fine if you make me, I'll show it.
I don't think there's any surprise about what will happen, but just in case, it just converts everything
to lowercase OC.
So that's upper and lower.
That was a lot of stuff, all these different string functions we saw.
Now it's time for you to get some practice doing it yourself.