g.js — graphical objects for JavaScript

toTitleCasetoTitleCase

Convert a string to title case.

g.toTitleCase('hello world');

This makes every first character of the word in uppercase, and the rest in lowercase.

Parameters

  • s: The input string.

See Also