to-title-case

to-title-case.js

Methods

static titleCaseEquals(str1, str2) → {boolean}

Compares the TitleCase versions of the two strings for equality.

Parameters:
Name Type Description
str1 string

The first string to compare

str2 string

The second string to compare

Returns:
boolean -

Whether the TitleCase versions of the strings are equal

inner toTitleCase(string) → {string}

Uppercase the first letter of a string.

Parameters:
Name Type Description
string string

String to be uppercased

Returns:
string -

The string with an uppercased first letter