npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

sridhar-string-module

v1.0.2

Published

var sridhar-string-module = require('sridhar-string-module');

Downloads

6

Readme

sridhar-string-module - Some of the String Operations in Javascript

sridhar-string-module - In this Module Provide some of the String Operation's. We can do Some type of String operations with the help of this module

Prerequisites

On Ubuntu/Debian:

sudo apt install npm nodejs

On Windows: npm install -g npm

Installation

Use Node to install from NPM Package Module

$ npm install <module name> --save

Usage of sridhar-string-module

Importing module with the help of creating node object

var sridhar-string-module = require('sridhar-string-module');

Find the Slices of the Given String

Usage
var slice_string = sridhar-math-module.slice_string(string,start_index,end_index);
console.log(slice_string);
Example
var slice_string = sridhar-math-module.slice_string("hello world",1,4);
console.log(slice_string);
Output

ello

Replace the Given String in previous String

Usage
var replace_string = sridhar-math-module.replace_string(string,start_index,end_index);
console.log(replace_string);
Example
var replace_string = sridhar-math-module.replace_string("hello world","Hello World");
console.log(replace_string);
Output

Hello World

Replace the Given String in All cases

Usage
var upper = sridhar-math-module.replace_all_string(string,start_index,end_index);
console.log(replace_all_string);
Example
var replace_all_string = sridhar-math-module.replace_all_string("hello world","Hello World");
console.log(replace_all_string);
Output

Hello World

Convert the Given String to Upper Case of the String

Usage
var upper = sridhar-math-module.upper(string);
console.log(upper);
Example
var upper = sridhar-math-module.upper("hello world");
console.log(upper);
Output

HELLO WORLD

Convert the Given String to Lower Case of the String

Usage
var lower = sridhar-math-module.lower(string);
console.log(lower);
Example
var lower = sridhar-math-module.lower("HELLO WORLD");
console.log(lower);
Output

hello world

Concatinate the Given Two String's

Usage
var concat_string = sridhar-math-module.concat_string(string1,string2);
console.log(concat_string);
Example
var concat_string = sridhar-math-module.concat_string("HELLO WORLD","I AM FROM INDIA");
console.log(concat_string);
Output

HELLO WORLD I AM FROM INDIA

Remove the all the white Spaces form the Given String

Usage
var trim = sridhar-math-module.trim(string);
console.log(trim);
Example
var trim = sridhar-math-module.trim("HELLO   WORLD  ");
console.log(trim);
Output

HELLOWORLD

Remove the End of the white Spaces form the Given String

Usage
var trimEnd = sridhar-math-module.trimEnd(string);
console.log(trimEnd);
Example
var trimEnd = sridhar-math-module.trimEnd("HELLO   WORLD  ");
console.log(trimEnd);
Output

HELLO WORLD

split the Given String into Multiple parts

Usage
var spilt = sridhar-math-module.spilt(string,requirment);
console.log(spilt);
Example
var spilt = sridhar-math-module.spilt("HELLO,WORLD",",");
console.log(spilt);
Output

"HELLO" "WORLD"

Get the specific Element in the Given String

Usage
var get_Index_element_string = sridhar-math-module.get_Index_element_string(string,index);
console.log(get_Index_element_string);
Example
var get_Index_element_string = sridhar-math-module.get_Index_element_string("hello world",3);
console.log(get_Index_element_string);
Output

l

"HELLO" "WORLD"

Chage the Capital in the first letter of the Given String

Usage
var capital_first_letter_each = sridhar-math-module.capital_first_letter_each(string);
console.log(capital_first_letter_each);
Example
var capital_first_letter_each = sridhar-math-module.capital_first_letter_each("hello world");
console.log(capital_first_letter_each);
Output

Hello World

Find the position of the given substring

Usage
var position_of_substring = sridhar-math-module.position_of_substring(string,substring);
console.log(position_of_substring);
Example
var position_of_substring = sridhar-math-module.position_of_substring("hello world",world);
console.log(position_of_substring);
Output

6