1.0.1 • Published 3 years ago

@matthewwei35/bad_string_lib v1.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

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