WEBVTT

00:00.090 --> 00:06.570
All right moving along to the next function which is reverse and reverse does sort of sounds like it

00:06.570 --> 00:09.190
reverses strings.

00:09.200 --> 00:14.920
That's why I said it's super straight forward you know forward reverse to Joe.

00:15.420 --> 00:16.620
Yep.

00:16.680 --> 00:17.580
So that's what it does.

00:17.580 --> 00:19.560
It will reverse a string.

00:19.620 --> 00:20.780
So here's an example.

00:20.880 --> 00:29.600
Select reverse of hello world and we get this or oh oh oh.

00:30.120 --> 00:35.070
I think it's probably best if I just stop pronouncing them from here on out but you get the reversed

00:35.070 --> 00:40.280
version of the string same casing and everything same space is just reversed.

00:41.580 --> 00:43.500
And that's kind of all there is to it.

00:43.500 --> 00:45.590
To be honest I'll show you a couple of examples.

00:45.600 --> 00:49.950
But if you feel like you already have it you know that was enough for you and you understand how it

00:49.950 --> 00:51.710
works and feel free to just move on.

00:51.870 --> 00:55.910
But I'll go over to cloud 9 and show a couple of examples.

00:56.070 --> 01:03.750
So let's do a select reverse and instead of hello world let's just do it meow meow.

01:03.810 --> 01:09.620
Why not just like that and we get what oh I said I couldn't pronounce.

01:09.690 --> 01:12.230
Well we get this right here.

01:12.810 --> 01:14.820
Reverse of Yeah yeah.

01:15.030 --> 01:22.010
So we could do the same thing to find the reverse of every author's first name in our table for instance.

01:22.230 --> 01:29.370
So that would be a select reverse author name.

01:29.820 --> 01:39.420
And then from books and there we go we get the reverse of Jhoom further a version of Neal and so on.

01:39.840 --> 01:41.650
And that's kind of it.

01:41.790 --> 01:45.160
And just like some of these other ones we can combine them.

01:45.180 --> 01:50.190
So if I wanted to turn something into a palindrome for instance let's say I started with the string

01:50.430 --> 01:51.640
Wolf.

01:52.080 --> 01:56.520
And if you're not familiar palindrome something that reads the same forwards backwards.

01:56.520 --> 02:03.380
So the way I would do that is by adding f o w to that and concatenating them.

02:03.390 --> 02:08.900
So taking the original string plus the reverse string and concatenating them.

02:09.240 --> 02:11.950
So we have two functions we've seen how to do that.

02:12.240 --> 02:14.670
And it's just a matter of concat.

02:15.000 --> 02:19.050
So a select Concat.

02:19.470 --> 02:21.580
And we'll just start with with.

02:22.410 --> 02:24.230
And then what do we want to concatenate it with.

02:24.360 --> 02:34.280
Well we want to concat and hit it with the reverse of just like that and that should do it.

02:34.290 --> 02:40.740
Let's try it out and we get this the palindrome version.

02:40.740 --> 02:43.050
I guess we just made this sandwich.

02:43.350 --> 02:47.080
Now let's just try it with authors first names again.

02:47.400 --> 02:49.510
So let's do that now.

02:50.100 --> 02:54.930
All we need to do is replace a couple of things in here so rather than can catting with we're going

02:54.930 --> 02:55.260
to do.

02:55.260 --> 03:05.130
Author f name and then we're going to use the reverse of author name as well.

03:05.910 --> 03:07.690
Just like that.

03:07.860 --> 03:10.160
And then of course we need to say from where.

03:10.260 --> 03:12.270
From books.

03:12.730 --> 03:14.220
Let's copy that.

03:14.220 --> 03:19.740
So just again taking the author's first name the reverse of the author's first name and we're smashing

03:19.740 --> 03:20.970
them together with concat

03:23.620 --> 03:25.370
and there we go.

03:25.810 --> 03:27.800
We get some kind of funny I guess.

03:27.920 --> 03:36.910
David Deaver D and I don't think any of them are really pronounceable otherwise but they are valid palindromes.

03:37.210 --> 03:38.970
So I guess we succeeded at something.
