Strings
Unlock the Power of Strings with Nexium's Essential Methods
Import the NString
trimStart
Removes whitespace from the beginning of a string.
trimEnd
Removes whitespace from the end of a string.
isPalindrome
Checks if a string reads the same forwards and backwards.
generate random string
Generates a random string of specified length using given pattern characters.
remove diacritics
Removes accent marks and diacritical signs from characters.
replace string
Replaces all occurrences of a substring with another string.
endsWith
Checks if a string ends with the specified substring.
case convertors
Converts strings between different case formats (kebab, snake, camel).
slugify
Converts a string into a URL-friendly slug format.
wordsArray
Splits a string into an array of words, removing extra spaces.
insertedStringAt
Inserts a string at a specified position within another string.
removeDuplicates
Removes consecutive duplicate characters from a string.
stripHTML
Removes HTML tags from a string, leaving only the text content.
reverse
Reverses the characters in a string.
countOccurrences
Counts how many times a substring appears in a string.