fx
Append Strings on Value with spreaded arguments
Arguments:
Returns:
The concatenated string
Append Strings on Value with spreaded arguments
The concatenated string
Append Array of Strings on Value
The concatenated string
Get the character at index
The character at position index
Decodes data encoded with MIME base64
The data to decode.
Encodes data with MIME base64. Base64-encoded data takes about 33% more space than the original data.
The data to encode.
Returns array with strings between [start] and [end]
Convert binary unicode (16 digits) string to string chars
Value to decode
Convert string chars to binary unicode (16 digits)
Value to encode
Returns an array consisting of the characters in the string.
The input string
Replaces consecutive whitespace characters with a single space
The input string
The whitespace collapsed string
Compares two strings to each other. If they are equivalent, a zero is returned. Otherwise, most of these routines will return a positive or negative result corresponding to whether stringA is lexicographically greater than, or less than, respectively, than stringB.
Verifies that the needle is contained in value
The input string
The string which is checked to be contained within value
Use case (in-)sensitive matching
True if needle
is contained
Verifies that all needles are contained in value
The input string
An array of strings which are checked to be contained within value
Use case (in-)sensitive matching
True if all needles
are contained
Verifies that one or more of needles are contained in value
The input string
An array of string which are checked to be contained within value
Use case (in-)sensitive matching
True if at least one of needles
is contained
Count the number of times substr appears in value
The input string
The substring to look for
Use case (in-)sensitive matching
Allow overlapping substrings to be counted
The number of matches
Convert binary unicode (16 digits) string to string chars
Value to decode
Convert string chars to decimal unicode (5 digits)
Value to encode
Test if value
ends with search
The input string
The string to search for
The start position/index within value
to start searching
Use case (in-)sensitive matching
True if input
ends with search
Ensures that the value
begins with substr
. If it doesn't, it's prepended.
The input string
The substr to be ensured to be left
Use case (in-)sensitive matching for determining if value
already starts with substr
The string which is guarenteed to start with substr
Ensures that the [value] ends with [substr]. If it doesn't, it's appended.
The input string
The substr to be ensured to be right
Use case (in-)sensitive matching for determining if value
already ends with substr
The string which is guarenteed to start with substr
Tests if two strings are equal.
Return the first 'n' chars of string.
Formats a string using parameters.
Value that will be formatted.
Array with the parameters described in the string.
Convert hexadecimal unicode (4 digits) string to string chars
Value to decode
Convert string chars to hexadecimal unicode (4 digits)
Value to encode
Convert all HTML entities to applicable characters.
Convert all applicable characters to HTML entities.
The indexOf() method returns the index within the calling String of the first occurrence of the specified value, starting the search at fromIndex. Returns -1 if the value is not found.
The String!.
Value to search.
Offset to search.
if you use caseSensitive to test.
Tests if two strings are inequal.
Inserts 'substr' into the 'value' at the 'index' provided.
Verify if has lowerCase
The String!.
Checks whether a string.
The String!.
Verify if has UPPERCASE
The String!.
Return the last 'n' chars of string.
The lastIndexOf() method returns the index within the calling String object of the last occurrence of the specified value, searching backwards from fromIndex. Returns -1 if the value is not found.
The String!.
Value to search.
Offset to search.
if you use caseSensitive to test.
Returns a new string of a given length such that the beginning of the string is padded.
Remove all spaces on left.
The String!.
Returns the length of the string.
The String!.
Returns a new string starting with 'prepends'.
Returns a new string starting with 'prepends'.
Remove empty strings from strings array.
Returns a new string with the 'prefix' removed, if present.
The String!.
String to remove on left.
If you need to caseSensitive.
Remove all non word characters.
Returns a new string with the 'suffix' removed, if present.
The String!.
String to remove on right.
If you need to caseSensitive.
Remove all spaces and replace for value.
Returns a repeated string given a multiplier.
Replace all ocurrences of 'search' value to 'newvalue'. var replace = require('strman').replace; let title = "superman"; let result = replace(title, 'upe', 't');
The String!.
String to search.
String to replace.
if you use caseSensitive replace.
if you use multiline replace.
Returns a reversed string.
The String!.
Returns a new string of a given length such that the ending of the string is padded.
Remove all spaces on right.
The String!.
Truncate the string securely, not cutting a word in half. It always returns the last full word.
Value will be truncated securely.
Max size of the returned string.
Value that will be added to the end of the return string. Example: '...'
It returns a string with its characters in random order.
The String!.
Alias to slice method.
Converts a value to a slug.
The value to slugify
Alias to split function.
Test if 'value' starts with 'search'
The String!.
Value to search.
offset to search.
if you use caseSensitive to test.
Alias to substr function.
Surrounds a 'value' with the given 'substr'.
The String!.
The substr to append on left, if substrRight is null, this is appended in right.
The substr to append on right.
Transform to camelCase.
The String!.
Decamelize String
The String!.
Transform to kebab-case.
The String!.
Transform to lowercase.
The String!.
Transform to snake_case.
The String!.
Transform to StudlyCaps.
The String!.
Transform to uppercase.
The String!.
Remove all non valid characters. Example: change á => a or αΊ½ => e.
The String!.
Remove all spaces on left and right.
Truncate the unsecured form string, cutting the independent string of required position.
Value will be truncated unsecurely.
Size of the returned string.
Value that will be added to the end of the return string. Example: '...'
Decodes URL-encoded string
The string to be decoded
Replaces all characters with the appropriate UTF-8 escape sequences.
The string to be encoded