@matthewwei35/bad_string_lib
v1.0.1
Published
This library contains not so useful functions to manipulate strings.
Downloads
1
Readme
Bad String Library
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