Convert to Title Case Like a Boss #titlecase #javascript

preview_player
Показать описание
#shorts #javascript
Рекомендации по теме
Комментарии
Автор

mmm... okeeeeyy...
css: text-transform: capitalize;

bur_mister
Автор

please make the video louder i can't hear anything compared to other shorts

worldoftulen
Автор

This will just capitalize the first letter of each word. That isn't title case. Title case doesn't capitalize words like 'the' and 'a' and 'of' unless they're at the beginning of the title.

tomchrist
Автор

That's not title case though. What you implemented is called *start case* or *initial caps*. Unlike these two, title case should not have every first letter be uppercase.

There are certain words that should never start with uppercase, and others that should always start with uppercase. There's no one standard for title case though, so you should check out something like wikipedia for a list of title case standards

snailedlt
Автор

Could you tell me if you are willing to check my extension? Maybe you'll consider including it into an "extension of the week" short. If you you are willing to check it, please tell me.

raress
Автор

Literally just make the string have capital letters on the first letter

bigzigtv
Автор

Oh god this is javascript oh god please spare me

edy
Автор

Python be like:
I have a function for that one too. Next time try harder.

elgobert
Автор

Or just use a library like lodash and save yourself 3 lines of code

nathandopko
Автор

Or:
"hello world".split(" ").map((word) => word.toUppercase()).join(" ")

kaypakaipa