Skip to content

fp05107/react-native-stringy-core

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React Native Stringy Core

npm version GitHub issues GitHub license

Installation

Install the package using npm:

npm install react-native-stringy-core

Usage

Import the desired string manipulation methods into your React Native project:

import {
  reverseString,
  capitalize,
  concatStrings,
  truncateString,
  countWords,
  shuffleString
} from 'react-native-stringy-core';

Available Methods

reverseString

Reverses a given string.

const reversed = reverseString('Hello, World!');
console.log(reversed); // Outputs: !dlroW ,olleH

capitalize

Capitalizes the first letter of a string.

const capitalized = capitalize('hello');
console.log(capitalized); // Outputs: Hello

concatStrings

Concatenates two strings.

const result = concatStrings('Hello', 'World!');
console.log(result); // Outputs: HelloWorld!

truncateString

Truncates a string to a specified maximum length.

const truncated = truncateString('This is a long text', 10);
console.log(truncated); // Outputs: This is a...

countWords

Counts the number of words in a string.

const wordCount = countWords('Hello world, how are you?');
console.log(wordCount); // Outputs: 6

shuffleString

Shuffles the characters of a string.

const shuffled = shuffleString('abcde');
console.log(shuffled); // Outputs: ebdca

License

This project is licensed under the ISC License - see the LICENSE file for details.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published