Strings

String, regular expression and StringBuilder functions.

String, regular expression and StringBuilder functions. 81 entries. This page is generated from the MatchBox source; see the function reference index for how to read the tables and what each gate means.

FunctionFormsGateNotes
asciiascii( ... ), string.ascii( ... )alwaysReturns the character code of the first character.
camelCasecamelCase( ... ), string.camelCase( ... )alwaysConverts text to camelCase.
charchar( ... )always
chrchr( ... )alwaysReturns the character for a character code.
comparecompare( ... ), string.compare( ... )alwaysCompares two strings case-sensitively and returns -1, 0 or 1.
compareNoCasecompareNoCase( ... ), string.compareNoCase( ... )alwaysLike compare, ignoring case.
findfind( ... )alwaysReturns the 1-based position of the first case-sensitive match, or 0.
findNoCasefindNoCase( ... )alwaysLike find, ignoring case.
findOneOffindOneOf( ... ), string.findOneOf( ... )always
indexOfindexOf( ... ), string.indexOf( ... )always
insertinsert( ... ), string.insert( ... )alwaysInserts text after the given position: insert( text, string, position ).
isStringBuilderisStringBuilder( ... )alwaysReturns true for a StringBuilder object.
jsStringFormatjsStringFormat( ... ), string.jsFormat( ... ), string.jsStringFormat( ... )always
kebabCasekebabCase( ... ), string.kebabCase( ... )alwaysConverts text to kebab-case.
lcaselcase( ... ), string.lcase( ... ), string.toLowerCase( ... )alwaysConverts a string to lower case.
leftleft( ... ), string.left( ... )alwaysReturns the first n characters.
lenlen( ... ), array.count( ... ), array.len( ... ), array.length( ... ), array.size( ... ), datetime.len( ... ), number.len( ... ), number.length( ... ), string.len( ... ), string.length( ... ), struct.count( ... ), struct.len( ... )always
ljustifyljustify( ... ), string.ljustify( ... )alwaysPads on the right so the text is left-justified in the given width.
ltrimltrim( ... ), string.ltrim( ... )alwaysRemoves leading whitespace.
midmid( ... ), string.mid( ... )alwaysReturns count characters starting at a 1-based position.
paragraphFormatparagraphFormat( ... ), string.paragraphFormat( ... )always
pascalCasepascalCase( ... ), string.pascalCase( ... )alwaysConverts text to PascalCase.
preserveSingleQuotespreserveSingleQuotes( ... )always
reEscapereEscape( ... )always
reFindreFind( ... ), string.reFind( ... )alwaysReturns the 1-based position of the first regular expression match, or 0.
reFindNoCasereFindNoCase( ... ), string.reFindNoCase( ... )always
reMatchreMatch( ... ), string.reMatch( ... )alwaysReturns an array of all regular expression matches.
reMatchNoCasereMatchNoCase( ... ), string.reMatchNoCase( ... )always
removeCharsremoveChars( ... ), string.removeChars( ... )alwaysRemoves count characters starting at a position.
repeatStringrepeatString( ... )alwaysRepeats a string count times.
replacereplace( ... ), string.replace( ... )alwaysReplaces the first match; with the scope "all" it replaces every match.
replaceListreplaceList( ... ), string.replaceList( ... )alwaysReplaces each item of one list with the item at the same position of another list.
replaceNoCasereplaceNoCase( ... ), string.replaceNoCase( ... )alwaysLike replace, ignoring case.
reReplacereReplace( ... ), string.reReplace( ... )alwaysReplaces the first regular expression match; with the scope "all" it replaces every match.
reReplaceNoCasereReplaceNoCase( ... ), string.reReplaceNoCase( ... )always
reversereverse( ... ), string.reverse( ... )alwaysReverses a string.
rightright( ... ), string.right( ... )alwaysReturns the last n characters.
rjustifyrjustify( ... ), string.rjustify( ... )alwaysPads on the left so the text is right-justified in the given width.
rtrimrtrim( ... ), string.rtrim( ... )alwaysRemoves trailing whitespace.
slugifyslugify( ... ), string.slugify( ... )alwaysConverts text to a URL slug.
snakeCasesnakeCase( ... ), string.snakeCase( ... )alwaysConverts text to snake_case.
spanExcludingspanExcluding( ... ), string.spanExcluding( ... )alwaysReturns the leading characters that are not in the given set.
spanIncludingspanIncluding( ... ), string.spanIncluding( ... )alwaysReturns the leading characters that are all in the given set.
stringBindstringBind( ... ), string.bind( ... ), string.stringBind( ... )always
stringBuilderAppendstringBuilderAppend( ... )always
stringBuilderClearstringBuilderClear( ... )always
stringBuilderContainsstringBuilderContains( ... )always
stringBuilderDeletestringBuilderDelete( ... )always
stringBuilderEndsWithstringBuilderEndsWith( ... )always
stringBuilderFindstringBuilderFind( ... )always
stringBuilderInsertstringBuilderInsert( ... )always
stringBuilderLeftstringBuilderLeft( ... )always
stringBuilderMidstringBuilderMid( ... )always
stringBuilderNewstringBuilderNew( ... )alwaysCreates a StringBuilder object; see the StringBuilder methods on the native objects page.
stringBuilderPrependstringBuilderPrepend( ... )always
stringBuilderReplacestringBuilderReplace( ... )always
stringBuilderReversestringBuilderReverse( ... )always
stringBuilderRightstringBuilderRight( ... )always
stringBuilderStartsWithstringBuilderStartsWith( ... )always
stringBuilderTrimstringBuilderTrim( ... )always
stringEachstringEach( ... ), string.each( ... )always
stringEndsWithstringEndsWith( ... ), string.endsWith( ... )always
stringEndsWithNoCasestringEndsWithNoCase( ... ), string.endsWithNoCase( ... )always
stringEverystringEvery( ... ), string.every( ... )always
stringFilterstringFilter( ... ), string.filter( ... )always
stringFindstringFind( ... ), string.find( ... )always
stringFindNoCasestringFindNoCase( ... ), string.findNoCase( ... )always
stringLenstringLen( ... )always
stringMapstringMap( ... ), string.map( ... )always
stringNonestringNone( ... )always
stringReducestringReduce( ... ), string.reduce( ... )always
stringReduceRightstringReduceRight( ... ), string.reduceRight( ... )always
stringSomestringSome( ... ), string.some( ... )always
stringSortstringSort( ... ), string.sort( ... )always
stringStartsWithstringStartsWith( ... ), string.startsWith( ... )always
stringStartsWithNoCasestringStartsWithNoCase( ... ), string.startsWithNoCase( ... )always
stripCRstripCR( ... ), string.stripCR( ... )always
trimtrim( ... ), string.trim( ... )alwaysRemoves leading and trailing whitespace.
ucaseucase( ... ), string.toUpperCase( ... ), string.ucase( ... )alwaysConverts a string to upper case.
ucFirstucFirst( ... ), string.ucFirst( ... )alwaysUpper-cases the first character.
wrapwrap( ... ), string.wrap( ... )always
Edit this page Download Markdown Last updated Oct 27, 2026, 1:45:34 PM Report an issue