Refer to the below for a list of string functions available within Alaya Connector.
ascii (text; [remove diacritics])
This function removes all non-ascii characters from a text string.
ascii(Iěnštčeřgžrýoámíaét)
= Integromat
ascii(ěščřž;true)
= escrz
base64 (text)
This function transforms text to base64.
base64(integromat)
= aW50ZWdyb21hdA==
Users may combine the toBinary()
and toString()
functions to transform base64 encoded text to plain text, or to encode binary data.
toString(toBinary(aW50ZWdyb21hdA==;base64))
= integromat
capitalize (text)
This function converts the first character in a text string to uppercase.
capitalize(integromat)
= Integromat
contains (text; search string)
This function verifies if text contains the search string.
contains(Hello World;Hello)
= true
contains(Hello World;Bye)
= false
decodeURL (text)
This function decodes special characters in URL to text.
decodeURL(Automate%20your%20workflow)
= Automate your workflow
encodeURL (text)
This function encodes special characters in a text to a valid URL address.
escapeHTML (text)
This function skips all HTML tags in text.
escapeHTML(<b>Hello</b>)
= <b>Hello</b>
indexOf (string; value; [start])
This function returns the position of the first occurrence of a specified value in a string. This method returns "-1" if the value searched for never occurs.
indexOf(Integromat;t)
= 2
indexOf(Integromat;x)
= -1
indexOf(Integromat;t;3)
= 9
length (text or buffer)
This function returns the length of text string (number of characters) or binary buffer (buffer size in bytes).
length(hello)
= 5
lower (text)
This function converts all alphabetical characters in a text string to lowercase.
lower(Hello)
= hello
md5 (text)
This function calculates the md5 hash of a string.
md5(integromat)
= d155951844a40fb856108d803d4de33e
replace (text;search string; replacement string)
This function replaces the search string with the new string.
replace(Hello World;Hello;Hi)
= Hi World
Users can use regular expressions (enclosed in /.../
) as search strings with a combination of appended flags (like g
, i
, m
):
= All these numbers X X X X will be replaced with X
The replacement string can include the following special replacement patterns:
$&
: inserts the matched substring.
$n
: where n is a positive integer less than 100, nth can be inserted into the parenthesized, sub-match string. Please note that this is 1-indexed.
= Phone number is +420777111222
= Phone number: +420777111222
/ is (?<number>\d+)/
in the replacement string argument as this will throw an error.sha1 (text; [encoding]; [key])
This function calculates the sha1 hash of a string. If the key argument is specified, sha1 HMAC hash is returned instead. Supported encodings: "hex" (default), "base64" or "latin1".
sha1(integromat)
= 5572e727b5822e06d7d13c69f51b3addbfa5390f
sha256 (text; [encoding]; [key])
This function calculates the sha256 hash of a string. If the key argument is specified, sha256 HMAC hash is returned instead. Supported encodings: "hex" (default), "base64" or "latin1".
sha256(integromat)
= 17722b391d8f2004020cc7445685451bc42bf8f6621d7866ba96e8ffa42b68aa
sha512 (text; [output encoding]; [key]; [key encoding])
This function calculates the sha512 hash of a string. If the key argument is specified, sha512 HMAC hash is returned instead. Supported encodings are "hex" (default), "base64" or "latin1". Supported key encodings are "text" (default), "hex", "base64" or "binary". When using "binary" key encoding, a key must be a buffer and not a string.
sha512(integromat)
= dbb0c7d5aa108aca5d2476d00885a98aef9f9ed9ad1c4635abaf9c104793844b7dc52e0dfab43c893c55ff4a9db5d69b8be479716ee53149337456694f7aed7c
split (text; separator)
This function splits a string into an array of strings by separating the string into substrings.
split(John, George, Paul;,)
startcase (text)
This function capitalizes the first letter of every word and lower cases all other letters.
startcase(hey all)
= Hey all
stripHTML (text)
This function removes all HTML tags from text.
stripHTML(<b>Hey</b>)
= Hey
substring (text; start;end)
Returns a portion of a text string between the "start" position and "the end" position.
substring(Bonjour;0;3)
= Bon
substring(Hello;1;3)
= on
toBinary (value)
This function converts any value to binary data. You can also specify encoding as a second argument to apply binary conversions from hex or base64 to binary data.
toBinary(Integromat)
= 496e746567726f6d6174
toBinary(SW50ZWdyb21hdA==;base64)
= 496e746567726f6d6174
toString (value)
This function converts any value to a string.
trim (text)
This function removes space characters at the start or end of the text.
upper (text)
This function converts all alphabetical characters in a text string to uppercase.
upper(Bonjour)
= BONJOUR
Comments
0 comments
Article is closed for comments.