Methods
addPrefix(str, prefix) → {string}
Adds a prefix to a given string.
Parameters:
Name | Type | Description |
---|---|---|
str |
string | The string to add the prefix to. |
prefix |
string | The prefix to add to the string. |
Returns:
The resulting string with the prefix added.
- Type
- string
addSuffix(str, suffix) → {string}
Concatenates a suffix to a given string.
Parameters:
Name | Type | Description |
---|---|---|
str |
string | The original string. |
suffix |
string | The suffix to be added. |
Returns:
- The string with the suffix added.
- Type
- string
alphabetize(str) → {string}
Alphabetizes the words in a given string.
Parameters:
Name | Type | Description |
---|---|---|
str |
string | The input string to alphabetize. |
Returns:
- The alphabetized string.
- Type
- string
base64Decode(encodedStr) → {string}
Decode a base64-encoded password.
Parameters:
Name | Type | Description |
---|---|---|
encodedStr |
string | The base64-encoded password to decrypt. |
Returns:
The decoded password.
- Type
- string
base64Enode(str) → {string}
Encrypts a string using Base64 encoding.
Parameters:
Name | Type | Description |
---|---|---|
str |
string | The string to be encoded. |
Returns:
The encoded string.
- Type
- string
compare(str, encodedStr) → {boolean}
Compares a string with the Base64 encoded string.
Parameters:
Name | Type | Description |
---|---|---|
str |
string | The string to compare. |
encodedStr |
string | The encoded string to compare against. |
Returns:
- Returns `true` if the string matches the encoded string, `false` otherwise.
- Type
- boolean
decodeUri(str) → {string}
Decodes a URI string.
Parameters:
Name | Type | Description |
---|---|---|
str |
string | The URI string to decode. |
Returns:
- The decoded URI string.
- Type
- string
duplicate(str, countopt) → {string}
Duplicates a given string a specified number of times.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
str |
string | The string to be duplicated. | ||
count |
number |
<optional> |
2 | The number of times the string should be duplicated. Default is 2. |
Returns:
The duplicated string.
- Type
- string
encodeUri(str) → {string}
Encodes a URI string.
Parameters:
Name | Type | Description |
---|---|---|
str |
string | The URI string to be encoded. |
Returns:
- The encoded URI string.
- Type
- string
extractNumber(str) → {string}
Extracts numbers from a given string.
Parameters:
Name | Type | Description |
---|---|---|
str |
string | The input string from which numbers need to be extracted. |
Returns:
- The extracted numbers as a string.
- Type
- string
extractText(str) → {string}
Extracts alphabetic characters from a given string.
Parameters:
Name | Type | Description |
---|---|---|
str |
string | The input string from which alphabetic characters will be extracted. |
Returns:
- The extracted alphabetic characters as a single string.
- Type
- string
getDummyText() → {string}
Generates dummy text using the "Lorem ipsum" placeholder text.
Returns:
The generated dummy text.
- Type
- string
getRandomCharacters(limit) → {string}
Generates a random string of characters.
Parameters:
Name | Type | Description |
---|---|---|
limit |
number | The length of the random string to generate. |
Returns:
The randomly generated string.
- Type
- string
joinString(str) → {string}
Joins a string by replacing newline characters with spaces.
Parameters:
Name | Type | Description |
---|---|---|
str |
string | The input string to be joined. |
Returns:
The joined string with newline characters replaced by spaces.
- Type
- string
paraToSingleLine(str) → {string}
Converts a paragraph to a single line by removing extra whitespace.
Parameters:
Name | Type | Description |
---|---|---|
str |
string | The paragraph to be converted. |
Returns:
The converted paragraph as a single line.
- Type
- string
removeAllSpaces() → {string}
Removes all spaces from a given text.
Returns:
The text with all spaces removed.
- Type
- string
removeAllSymbols(str) → {string}
Removes all symbols from a given string.
Parameters:
Name | Type | Description |
---|---|---|
str |
string | The input string. |
Returns:
The modified string with symbols removed.
- Type
- string
removeExtraSpaces(str) → {string}
Removes extra spaces from a given string.
Parameters:
Name | Type | Description |
---|---|---|
str |
string | The input string. |
Returns:
The string with extra spaces removed.
- Type
- string
reverse(str) → {string}
Reverses a given string.
Parameters:
Name | Type | Description |
---|---|---|
str |
string | The string to be reversed. |
Returns:
The reversed string.
- Type
- string
rotate13Deg(str) → {string}
Rotates each character in a string by 13 positions in the alphabet.
Non-alphabetic characters remain unchanged.
Parameters:
Name | Type | Description |
---|---|---|
str |
string | The input string to be rotated. |
Returns:
The rotated string.
- Type
- string
slugify(str) → {string}
Converts a string into a slug by removing special characters and replacing spaces with hyphens.
Parameters:
Name | Type | Description |
---|---|---|
str |
string | The string to be slugified. |
Returns:
- The slugified string.
- Type
- string
splitString(str, breakPointopt) → {string}
Splits a string into an array of substrings based on a specified break point and joins them with a newline character.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
str |
string | The string to be split. | ||
breakPoint |
string |
<optional> |
" " | The break point at which to split the string. Defaults to a space character. |
Returns:
The string with substrings split at the break point and joined with a newline character.
- Type
- string
truncate(str, length) → {string}
Truncates a string to a specified length.
Parameters:
Name | Type | Description |
---|---|---|
str |
string | The string to be truncated. |
length |
number | The maximum length of the truncated string. |
Returns:
The truncated string.
- Type
- string
zalgo(text) → {string}
Generates a zalgo text by adding random diacritic characters to each character in the input string.
Parameters:
Name | Type | Description |
---|---|---|
text |
string | The input string. |
Returns:
The zalgo text generated from the input string.
- Type
- string