ES String Utils
A collection of utility functions which Javascript/Typescript misses for string manipulation in javascript and typescript.
Installation using npm
npm install es-string-utils --save
Installation using yarn
yarn add es-string-utils
Usage with es6 import
import { containsAnyIgnoreCase, capitalize } from 'es-string-utils';
const contains = containsAnyIgnoreCase('This is the source string', 'tocheck'); //false
const capitalizedText = capitalize('capitalize This strinG'); //Capitalize This String
Usage with plain old javascript
const stringUtils = require('es-string-utils');
const contains = stringUtils.containsAnyIgnoreCase('This is the source string', 'tocheck'); //false
const capitalizedText = stringUtils.capitalize('capitalize This strinG'); //Capitalize This String
Available Methods
- camelize
- capitalize
- compare
- concat
- contains
- containsIgnoreCase
- containsAny
- containsAnyIgnoreCase
- containsNone
- containsOnly
- countMatches
- deleteChars
- endsWithAny
- endsWithIgnoreCase
- equals
- equalsAny
- equalsIgnoreCase
many more on the way