Utility Hub is a universal utility library, which contains countless number of utility functions and classes for JavaScript projects.
npm install utility-hub
const { Ustring } = require("utility-hub");
or
const stringUtilities = require("utility-hub").Ustring;
capitalize(str)
- @description Returns a Capitalized string.
- @example\
-
Ustring.capitalize("string") will return "String"
Ustring.capitalize("title case string") will return "Title Case String". - @param {string} str The string to capitalize.
- @returns {string} string
/*
- @Copyright: 2018
- @Author: Mohammed Odunayo
- @Email: factman60@gmail.com
- @Date: 2018-09-05 11:50:08
- @Last Modified by: Mohammed Odunayo
- @Last Modified time: 2018-09-05 12:04:18 */