Skip to main content
The table summarizes the string functions available in APL.
NameDescription
base64_decode_toarrayDecodes a Base64-encoded string into an array of bytes.
base64_decode_tostringDecodes a base64 string to a UTF-8 string.
base64_encode_fromarrayConverts a sequence of bytes into a Base64-encoded string.
base64_encode_tostringEncodes a string as base64 string.
coalesceEvaluates a list of expressions and returns the first non-null (or non-empty for string) expression.
countof_regexCounts occurrences of a substring in a string. Regex matches don’t.
countofCounts occurrences of a substring in a string.
extract_allGets all matches for a regular expression from a text string.
extractGets a match for a regular expression from a text string.
format_bytesFormats a number of bytes as a string including bytes units
format_urlFormats an input string into a valid URL by adding the necessary protocol if it’s escaping illegal URL characters.
gettypeReturns the runtime type of its single argument.
indexofFunction reports the zero-based index of the first occurrence of a specified string within input string.
isasciiChecks whether all characters in an input string are ASCII characters.
isemptyReturns true if the argument is an empty string or is null.
isnotemptyReturns true if the argument isn’t an empty string or a null.
isnotnullReturns true if the argument isn’t null.
isnullEvaluates its sole argument and returns a bool value indicating if the argument evaluates to a null value.
parse_bytesParses a string including byte size units and returns the number of bytes
parse_csvSplits a given string representing a single record of comma-separated values and returns a string array with these values.
parse_jsonInterprets a string as a JSON value and returns the value as dynamic.
parse_urlParses an absolute URL string and returns a dynamic object contains all parts of the URL.
parse_urlqueryParses a URL query string and returns a dynamic object contains the Query parameters.
quoteReturns a string representing the input enclosed in double quotes, with internal quotes and escape sequences handled appropriately.
replace_regexReplaces all regex matches with another string.
replace_stringReplaces all string matches with another string.
replaceReplace all regex matches with another string.
reverseFunction makes reverse of input string.
splitSplits a given string according to a given delimiter and returns a string array with the contained substrings.
strcat_delimConcatenates between 2 and 64 arguments, with delimiter, provided as first argument.
strcatConcatenates between 1 and 64 arguments.
strcmpCompares two strings.
string-sizeReturns the length, in characters, of the input string.
strlenReturns the length, in characters, of the input string.
strrepRepeats given string provided number of times (default = 1).
substringExtracts a substring from a source string.
tolowerConverts a string to lower case.
totitleConverts a string to title case.
toupperConverts a string to upper case.
translateSubstitutes characters in a string, one by one, based on their position in two input lists.
trim_end_regexRemoves trailing match of the specified regular expression.
trim_endRemoves trailing match of the specified cutset.
trim_regexRemoves all leading and trailing matches of the specified regular expression.
trim_spaceRemoves all leading and trailing whitespace from a string.
trim_start_regexRemoves leading match of the specified regular expression.
trim_startRemoves leading match of the specified cutset.
trimRemoves all leading and trailing matches of the specified cutset.
unicode_codepoints_from_stringConverts a UTF-8 string into an array of Unicode code points.
unicode_codepoints_to_stringConverts an array of Unicode code points into a UTF-8 encoded string.
url_decodeConverts encoded URL into a regular URL representation.
url_encodeConverts characters of the input URL into a format that can be transmitted over the Internet.