Skip to content

@technobuddha > library > String

Operations

NameTypeDescription
cleanFunctionRemove all occurrences of characters from the beginning and end of the string
cleanEndFunctionRemove all occurrences of characters from the end of the string
cleanStartFunctionRemove all occurrences of characters from the start of the string
collapseBreakingSpaceFunctionReplace all breaking space (space, tab, carriage return, new line) with a single space
CollapseBreakingSpaceOptionsTypeOptions for the collapseBreakingSpace function
collapseWhitespaceFunctionReplace all whitespace within a string with a single space
CollapseWhitespaceOptionsTypeOptions for the collapseWhitespace function
correctMSWordFunctionCorrect character sequences that Microsoft Word changes to make it look prettier
countFunctionCompute the number of times a substring occurs within a string
CountOptionsTypeOptions for the count function
FilenameOptionsTypeOptions for the toFilename function
fillTemplateFunctionFill a template with supplied values
FillTemplateOptionsTypeOptions for the fillTemplate function
indentFunctionIndent each line of a string
IndentOptionsTypeOptions for the indentation functions: getIndent, indent, and unindent
initialsFunctionReturns the uppercase initials of the given string.
maskFunctionUse a simple mask to display a string
MaskOptionsTypeOptions for the mask function
numberToLetterFunctionConvert a number to a letter, using the alphabet (default: A-Z)
NumberToLetterOptionsTypeOptions for the numberToLetter function
singleLineFunctionJoins a template literal into a single line string by removing line breaks and leading whitespace, then interleaving the provided arguments. The result is a trimmed, single-line string.
sortOrderFunctionConvert a string into a sortable string
SortOrderOptionsTypeOptions for the sortOrder function
stripFunctionRemoves unwanted sequences from the input string.
StripOptionsTypeOptions for stripping unwanted characters or sequences from strings.
toASCIIFunctionChange a string to be all from the basic latin unicode plane
toEnumerationFunctionConvert a string to a numeric value
toFilenameFunctionConvert a string so that it can be used as a filename
unindentFunctionRemove indentation from text
wordwrapFunctionWrap text so that it fits within a area of fixed width
WordwrapOptionsTypeOptions for the wordwrap function