Skip to main content

Capitalize String

Simple helper function to capitalize the first letter of a given string.

Usage

capiString(str);

So on the str you need to put a string.

Example

const { capiString } = require("argonium/lib");

const normalString = "hello world";
const capitalizedString = capiString(normalString);

console.log(capitalizedString);

Should return

Hello world