String

Formatting

Format a string (format)

Format strings contain “replacement fields” surrounded by curly braces {}. Anything that is not contained in braces is considered literal text, which is copied unchanged to the output. If you need to include a brace character in the literal text, it can be escaped by doubling: {{ and }}.

 

{ }
[{"data":{"type":"library","step":"Format hello world","call":"string.format","args":{"template":"{1},{0}","data":"[\"hello\",\"world\"]"},"data_to_var":"result","maxpaths":1,"uuid":"fdca9b5c02f99534f1a128d64bec8871","x":531,"y":209,"width":120,"height":32,"string":"string","string.format":"format"},"paths":[]}]

Example Response

{"result":"world,hello"}

Capitalize a string (capitalize)

Return a copy of the string with its first character capitalized and the rest lowercased.

 

{ }
[{"data":{"type":"library","step":"Capitalize 'graph'","call":"string.capitalize","args":{"word":"graph"},"data_to_var":"result","maxpaths":1,"uuid":"fdca9b5c02f99534f1a128d64bec8871","x":531,"y":209,"width":120,"height":32,"string":"string","string.capitalize":"capitalize"},"paths":[]}]

Example Response

{"result":"Graph"}

Lowercase a string (lower)

Return a copy of s, but with upper case letters converted to lower case.

 

{ }
[{"data":{"type":"library","step":"format string to lowercase","call":"string.lower","args":{"word":"The quick brown fox jumps over the lazy dog"},"data_to_var":"result","maxpaths":1,"uuid":"fdca9b5c02f99534f1a128d64bec8871","x":531,"y":209,"width":120,"height":32,"string":"string","string.lower":"lower"},"paths":[]}]

Example Response

{"result":"the quick brown fox jumps over the lazy dog"}

Uppercase a string (upper)

Return a copy of s, but with lower case letters converted to upper case.

 

{ }
[{"data":{"type":"library","step":"format string to uppercase","call":"string.upper","args":{"word":"The quick brown fox jumps over the lazy dog"},"data_to_var":"result","maxpaths":1,"uuid":"fdca9b5c02f99534f1a128d64bec8871","x":531,"y":209,"width":120,"height":32,"string":"string","string.upper":"upper"},"paths":[]}]

Example Response

{"result":"THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"}

Remove whitespace before & after string (strip)

Return a copy of the string with leading and trailing characters removed. If chars is omitted or None, whitespace.

 

{ }
[{"data":{"type":"library","step":"strip whitespace","call":"string.strip","args":{"word":" The quick brown fox jumps over the lazy dog ","characters":null},"data_to_var":"result","maxpaths":1,"uuid":"fdca9b5c02f99534f1a128d64bec8871","x":531,"y":209,"width":120,"height":32,"string":"string","string.strip":"strip"},"paths":[]}]

Example Response

{"result":"The quick brown fox jumps over the lazy dog"}

Remove whitespace before string (lstrip)

Return a copy of the string with leading characters removed. If chars is omitted or None, whitespace characters are removed. If given and not None, chars must be a string; the characters in the string will be stripped from the beginning of the string this method is called on.

 

{ }
[{"data":{"type":"library","step":"strip left whitespace","call":"string.lstrip","args":{"word":" The quick brown fox jumps over the lazy dog ","characters":null},"data_to_var":"result","maxpaths":1,"uuid":"fdca9b5c02f99534f1a128d64bec8871","x":531,"y":209,"width":120,"height":32,"string":"string","string.lstrip":"lstrip"},"paths":[]}]

Example Response

{"result":"The quick brown fox jumps over the lazy dog "}

Remove whitespace after string (rstrip)

Return a copy of the string with trailing characters removed. If chars is omitted or None, whitespace characters are removed. If given and not None, chars must be a string; the characters in the string will be stripped from the end of the string this method is called on.

 

{ }
[{"data":{"type":"library","step":"strip right whitespace","call":"string.rstrip","args":{"word":" The quick brown fox jumps over the lazy dog ","characters":null},"data_to_var":"result","maxpaths":1,"uuid":"fdca9b5c02f99534f1a128d64bec8871","x":531,"y":209,"width":120,"height":32,"string":"string","string.rstrip":"rstrip"},"paths":[]}]

Example Response

{"result":" The quick brown fox jumps over the lazy dog"}

Left-justify a string to a certain number of characters (ljust)

Left-justify a string in a field of given width. Return a string that is at least width characters wide, created by padding the string s with the character fillchar (default is a space) until the given width on the right side. The string is never truncated.

 

{ }
[{"data":{"type":"library","step":"left-justify string to 10 characters","call":"string.ljust","args":{"word":"graph","width":10,"character":"X"},"data_to_var":"result","maxpaths":1,"uuid":"fdca9b5c02f99534f1a128d64bec8871","x":531,"y":209,"width":120,"height":32,"string":"string","string.ljust":"ljust"},"paths":[]}]

Example Response

{"result":"graphXXXXX"}

Right-justify a string to a certain number of characters (rjust)

Right-justify a string in a field of given width. Return a string that is at least width characters wide, created by padding the string s with the character fillchar (default is a space) until the given width on the left side. The string is never truncated.

 

{ }
[{"data":{"type":"library","step":"right-justify string to 10 characters","call":"string.rjust","args":{"word":"graph","width":10,"character":"X"},"data_to_var":"result","maxpaths":1,"uuid":"fdca9b5c02f99534f1a128d64bec8871","x":531,"y":209,"width":120,"height":32,"string":"string","string.rjust":"rjust"},"paths":[]}]

Example Response

{"result":"XXXXXgraph"}

Center-justify a string to a certain number of characters (cjust)

Center a string in a field of given width. Return a string that is at least width characters wide, created by padding the string s with the character fillchar (default is a space) until the given width on both sides. The string is never truncated.

 

{ }
[{"data":{"type":"library","step":"center-justify string to 10 characters","call":"string.cjust","args":{"word":"graph","width":10,"character":"X"},"data_to_var":"result","maxpaths":1,"uuid":"fdca9b5c02f99534f1a128d64bec8871","x":531,"y":209,"width":120,"height":32,"string":"string","string.cjust":"cjust"},"paths":[]}]

Example Response

{"result":"XXgraphXXX"}

URL escape a string

Replace special characters in string using the %xx escape. Letters, digits, and the characters '_.-' are never quoted. By default, this function is intended for quoting the path section of the URL. The optional safe parameter specifies additional characters that should not be quoted — its default value is '/'.

 

{ }
[{"data":{"type":"library","step":"escape a string","call":"string.escape","args":{"word":"The quick brown fox jumps over the lazy dog"},"data_to_var":"result","maxpaths":1,"uuid":"fdca9b5c02f99534f1a128d64bec8871","x":531,"y":209,"width":120,"height":32,"string":"string","string.escape":"escape"},"paths":[]}]

Example Response

{"result":"The%20quick%20brown%20fox%20jumps%20over%20the%20lazy%20dog"}

Remove URL escaping from a string

Replace %xx escapes by their single-character equivalent.

 

{ }
[{"data":{"type":"library","step":"unescape a string","call":"string.unescape","args":{"word":"The%20quick%20brown%20fox%20jumps%20over%20the%20lazy%20dog"},"data_to_var":"result","maxpaths":1,"uuid":"fdca9b5c02f99534f1a128d64bec8871","x":531,"y":209,"width":120,"height":32,"string":"string","string.unescape":"unescape"},"paths":[]}]

Example Response

{"result":"The quick brown fox jumps over the lazy dog"}