# @christopher_debray/string-manipulations

> A collection of string manipulation functions

Latest version **1.0.1** (published 2023-03-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install @christopher_debray/string-manipulations
pnpm add @christopher_debray/string-manipulations
yarn add @christopher_debray/string-manipulations
bun add @christopher_debray/string-manipulations
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2023-03-05 |
| First published | 2023-03-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Christopher Debray |
| Maintainers | christopher_debray |
| Keywords | string, manipulation, utility, tool, javascript |

## Links

- npm: https://www.npmjs.com/package/@christopher_debray/string-manipulations
- Repository: https://github.com/ChristopherDebray/string-manipulations
- Homepage: https://github.com/ChristopherDebray/string-manipulations#readme
- Issues: https://github.com/ChristopherDebray/string-manipulations/issues
- npm.io page: https://npm.io/package/@christopher_debray/string-manipulations

## Alternatives

- [lodash.assign](https://npm.io/package/lodash.assign.md) — 2.3M weekly downloads
- [lodash.chunk](https://npm.io/package/lodash.chunk.md) — 1.8M weekly downloads
- [react-native-ios-utilities](https://npm.io/package/react-native-ios-utilities.md) — 138.5K weekly downloads
- [@technically/lodash](https://npm.io/package/@technically/lodash.md) — 50.9K weekly downloads
- [@fluid-topics/ft-icon](https://npm.io/package/@fluid-topics/ft-icon.md) — 20.6K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2023-03-05
- 1.0.0 — 2023-03-05

## README

# @christopher_debray/string-manipulations

`@christopher_debray/string-manipulations` is a lightweight JavaScript library that provides a collection of functions for manipulating strings.

## Installation

You can install the `@christopher_debray/string-manipulations` module using NPM:

## Usage

To use the `@christopher_debray/string-manipulations` module in your JavaScript project, simply import the module and call the desired functions:

```javascript
const stringUtils = require('@christopher_debray/string-manipulations');

const string = 'hello world';

stringUtils.capitalizeFirstLetter(string); // "Hello world"
stringUtils.reverseString(string); // "dlrow olleh"
stringUtils.countWords(string); // 2
stringUtils.trimString(string); // "hello world"
stringUtils.toTitleCase(string); // "Hello World"
stringUtils.truncateString(string, 5); // "hello..."
stringUtils.containsString(string, 'world'); // true
stringUtils.replaceAll(string, 'l', 'L'); // "heLLo worLd"
```

## Methods

- ***capitalizeFirstLetter(string)***<br />
Capitalizes the first letter of a string.


- ***reverseString(string)***<br />
Reverses the order of characters in a string.

- ***countWords(string)***<br />
Counts the number of words in a string.

- ***trimString(string)***<br />
Removes whitespace from the beginning and end of a string.

- ***toTitleCase(string)***<br />
Converts a string to title case (capitalizes the first letter of each word).

- ***truncateString(string, maxLength)***<br />
Truncates a string to a specified length and adds "..." at the end if the string is longer than the specified length.

- ***containsString(string, searchValue)***<br />
Checks if a string contains another string.

- ***replaceAll(string, searchValue, replaceValue)***<br />
Replaces all occurrences of a substring with another string.

## License
@christopher_debray/string-manipulations is licensed under the ISC License. See the LICENSE file for details.

---
_Source: https://npm.io/package/@christopher_debray/string-manipulations · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
