Support for string manipulation in javascript
The String class is extended using prototype
Returns true if the string contains any of the vowel letter _a, e, i, o, u_
e.g ('String class extended').hasVowels() equals `true`
Converts string characters to uppercases
e.g ("String class extended").toUpper() equals `"STRING CLASS EXTENDED"`
Converts string characters to lowercases
e.g ("STRING CLASS EXTENDED").toLower() equals `"string class extended"`
Converts the first string characters to uppercase, and the rest to lowercases
e.g ('string class extended').ucFirst() equals `"String class extended"`
Returns true if the string represensts a question i.e end with a `?` mark
e.g ("String class extended?").isQuestion() equals `true`
Returns an array of words in the string (words are assumed to only consist of alphabets, apostrophe and hyphen)
e.g ('String class extended').words() equals `["String", "class", "extended"]`
Counts the number of words in the string based on words().length
e.g ('String class extended').wordCount() equals `3`
Formats the string of numbers into currency format by inserting commas
e.g ("1234567.56").toCurrency() equals `1,234,567.56`
Returns the equivalent numeric value of currency formatted string
e.g ("1,234,567.56").fromCurrency() equals `1234567.56`
Note: The method extended from the string class utilizes regex for manipulating string datatypes