@matthewwei35/bad_string_lib

1.0.1 • Public • Published

Bad String Library

npm license GitHub size GitHub issues

Description

This library contains not so useful functions to manipulate strings.

Functions

addSmiley(str)            // Adds a smiley face after every character
// Input:   'Hello World'
// Output:  'H:)e:)l:)l:)o:) :)W:)o:)r:)l:)d:)'

deleteEvenChars(str)      // Deletes every even character
// Input:   'Hello World'
// Output:  'HloWrd'

capitalizeSecondChar(str) // Capitalizes only the second character
// Input:   'Hello World'
// Output:  'HEllo World'

deleteLastTwoChar(str)    // Deletes the last two characters
// Input:   'Hello World'
// Output:  'Hello Wor'

sayAmongUs()              // Returns the string 'Among Us'
// Output:  'Among Us'

Helper Functions

isEmpty(str)              // Checks if the given string is empty or not
// Input:   'Hello World'
// Output:  False

Readme

Keywords

none

Package Sidebar

Install

npm i @matthewwei35/bad_string_lib

Weekly Downloads

0

Version

1.0.1

License

ISC

Unpacked Size

4.61 kB

Total Files

5

Last publish

Collaborators

  • matthewwei35