Table of Contents
A comprehensive list of formatting methods commonly used by the Integrations team. This includes Jinja Filters, Python String Methods, and DSL Methods. Python methods which are applied to other data types can also be called, this list only covers the most commonly used ones.
Jinja Filters
Some Jinja filters are notated as “custom,” meaning that they are not in the standard library and have been created within Paradox.
| Filter | Description | Example Uses | Standard/Custom | Imported String |
|---|---|---|---|---|
| abs | Returns the absolute value of the piped value. | {{ -54 | abs }} → 54 | Standard | | abs |
| batch | Returns a list of lists each of the given size from the piped sequence. |
{{ [23, 55, 72, 1, 52, 673] | batch(2) | join(", ") }} → "[23, 55], [72, 1], [52, 673]" {{ "Paradox Olivia" | batch(4) | join(", ") }} → "['P', 'a', 'r', 'a'], ['d', 'o', 'x', ' '], ['O', 'l', 'i', 'v'], ['i', 'a']"
|
Standard | | batch(___BATCH_SIZE___) |
| capitalize |
Capitalizes strictly the first character of a string. NOTE: The first character may not be capitalizable such as a space. |
{{ "paradox olivia" | capitalize }} → "Paradox olivia" | Standard | | capitalize |
| center | Centers the piped value in a field of a given width |
{{ "Paradox Olivia" | center }} → "Paradox Olivia" {{ "Paradox Olivia" | center(20) }} → " Paradox Olivia " |
Standard | | center |
| default | Returns the given value if the piped value is not defined. | {{ cur_status |default("\"cur_status\" is undefined") }} → ""cur_status" is undefined" | Standard | | default("___DEFAULT_VALUE___") |
| escape | Replaces the characters &, <, >, ', and " with HTML-safe sequences. | "<< \'Paradox\' & \"Olivia\" >>" → << 'Paradox' & "Olivia" >> | Standard | | escape |
| first | Returns the first item of a sequence. | “Paradox Olivia" → "P" ["Paradox", "Olivia"] → "Paradox" |
Standard | | first |
| getattr |
Returns the value with the given key from the piped JSON object. NOTE: This is a custom function - It does not search strictly for attributes as the “attr()” filter does, it will also return items. Piped input MUST be a JSON object, not just a JSON string. (See parse_json) |
{{ "{\"firstName\":\"Brent\",\"lastName\":\"Julius\"}" | parse_json | getattr("firstName") }} → "Brent" | Custom | | getattr("___KEY_NAME___") |
| get_base64_resume_content |
Base64 encodes a resume. NOTE: The name makes it seem like this decodes a base64 resume, it does not. |
{{ __long_id | get_base64_resume_content }} →"Base64StringOfResume" | Custom | | get_base64_resume_content |
| get_base64_file_content |
Base64 encodes a document NOTE: This function takes a URL as an input |
{{(cover_letter|parse_json)['url'] | get_base64_file_content }} | Custom | | get_base64_file_content |
| get_resume_filename | Returns the file name of the given candidate’s resume. | {{__long_id|get_resume_filename}} → "Sample_Resume" | Custom | | get_resume_filename |
| initiated_by_email |
Returns the email of the user who moved candidate to the given status. NOTE: Statuses should follow format: “<StageName>: <StatusName>” |
{{ __long_id | initiated_by_email("Stage Name: Status Name") }} → "brent.julius+test1@paradox.ai" | Custom | | initiated_by_email("___CANDIDATE_JOURNEY_STATUS___") |
| join | Combines a sequence of items into a string delimited by a given parameter. | {{ ["Paradox", "Olivia", "Assistant"] | join(" : ") }} → "Paradox : Olivia : Assistant" | Standard | | join("___STRING_DELIMITER___") |
| last | Returns the last item of a sequence. | {{ “Paradox Olivia" | last }} → "a" {{ ["Paradox", "Olivia"] | last }} → "Olivia" |
Standard | | last |
| list | Converts the piped value into a list. |
{{ "Paradox" | list }} → ['P', 'a', 'r', 'a', 'd', 'o', 'x'] {{ {"company": "Paradox", "name": "Olivia"}.values() | list }} → ['Paradox', 'Olivia'] |
Standard | | list |
| lower | Converts all applicable characters in the piped sequence to lowercase. | {{ “Paradox Olivia" | lower }} → "paradox olivia" | Standard | | lower |
| map | Performs a defined action/filter on each element in piped sequence. | {{ ["PaRaDoX", "oLiViA"] | map("lower") | join(" ") }} → “paradox olivia" | Standard | | map("___FILTER___") |
| mapvalue | Returns the value corresponding to the piped key in the given Mapped Values set. NOTE: If piped value is not in provided Mapped Values set, Default Value will be returned. |
{{ "Scheduling: Interview Scheduled" | mapvalue("Status Values Map", "Status Mapping Error") }} → "Scheduling Complete" | Custom | | mapvalue("___MAPPED_VALUES_NAME___", "___DEFAULT_VALUE___") |
| max |
Returns the maximum value of a given sequence. NOTE: This will reference ascii codes if given characters/strings. |
{{ [24, 42, 31] | max }} → 42 {{ "Paradox_Olivia" | max }} → "x" {{ ["Paradox", "Olivia"] | max }} → "Paradox" |
Standard | | max |
| min |
Returns the minimum value of a given sequence. NOTE: This will reference ascii codes if given characters/strings. |
{{ [24, 42, 31] | min }} → 24 {{ "Paradox_Olivia" | min }} → "_" {{ ["Paradox", "Olivia"] | min }} → "Olivia" |
Standard | | min |
| parse_json | Converts a JSON string into a JSON object. | {{ "{\"firstName\":\"Brent\",\"lastName\":\"Julius\"}" | parse_json }} → {'firstName': 'Brent', 'lastName': 'Julius'} | Custom | | parse_json |
| pprint | Pretty prints the piped value, useful for debugging. | {{ "Paradox >>> Olivia" | pprint }} → "'Paradox >>> Olivia'" | Standard | | pprint |
| random | Returns a random item from the piped sequence. |
{{ ["Paradox", "Olivia", "Assistant"] | random }} → "Olivia" {{ "Paradox" | random }} → "a" |
Standard | | random |
| regex_replace | Replaces all contents matching the given regular expression in the piped value with the given string. Regex Examples Below: |
{{ "The chat bot named Olivia is changing the world of HR Tech." | regex_replace("chat bot", "assistive intelligence") }} → "The assistive intelligence named Olivia is changing the world of HR Tech." | Custom | | regex_replace("___REGULAR_EXPRESSION___") |
| reject | Applies a test to each element in a piped sequence and returns a sequence excluding all elements that passed. |
{{ [32, 42, 13, 42] | reject("==", 42) | join(" ")}} → "32, 13" {{ "Paradox Olivia" | reject("==", "a") | join("")}} → "Prdox Olivi" |
Standard | | reject("___TEST___", "___TEST_PARAMETER"___) |
| rejectattr | Applies a test on the specified attribute of each element in a piped sequence and returns a sequence excluding all elements that passed. |
→ Olivia |
Standard | | rejectattr("___ATTRIBUTE___", "___TEST___", "___TEST_RESULT___") |
| replace | Returns a copy of the given sequence with all instances of the given string/substring replaced with another string. |
{{ "Paradox Olivia" | replace("a", "4") }} → "P4r4dox Olivi4" {{ ["Paradox", "Olivia"] | replace("Paradox", "Assistant") | join("") }} → "['Assistant', 'Olivia']" |
Standard | | replace("___OLD_STRING___", "___NEW_STRING___") |
| reverse | Returns a copy of the given sequence with its order reversed. |
{{ "Paradox Olivia" | replace("a", "4") }} → "P4r4dox Olivi4" {{ ["Paradox", "Olivia"] | replace("Paradox", "Assistant") | join("") }} → "['Assistant', 'Olivia']" |
Standard | | reverse |
| round | Rounds the piped value to the nearest integer. |
{{ 32.54 | round }} → 33.0 {{ 32.24 | round(method="ceil") }} → 33.0 {{ 32.54 | round(method="floor") }} → 32.0
|
Standard | | round |
| safe | Marks the piped value as safe so it won’t get auto-escaped in another environment. | {{ "Paradox Olivia" | safe }} → "Paradox Olivia" | Standard | | safe |
| select | Applies a test to each element in a piped sequence and returns a sequence including only the elements that passed. |
{{ [32, 42, 13, 42] | select("==", 42) | join(" ") }} → "42, 42" {{ "Paradox Olivia" | select("==", "a") | join("") }} → "aaa" |
Standard | | select("___TEST___", "___TEST_PARAMETER"___) |
| selectattr |
Applies a test a specified attribute of each element in a piped sequence and returns a sequence including only the elements that passed. NOTE: Strictly searches attributes, not items. |
→ "Paradox\nBrent" |
Standard | | selectattr("___ATTRIBUTE___", "___TEST___", "___TEST_RESULT___") |
| slice | Splits the piped sequence into the given integer number of lists. |
{{ "Paradox" | slice(2) | join(", ") }} → ['P', 'a', 'r', 'a'] ::: ['d', 'o', 'x'] {{ [13, 42, 52, 35, 63] | slice(3) | join(" ::: ") }} → [13, 42] ::: [52, 35] ::: [63] |
Standard | | slice(___NUM_LISTS___) |
| sort |
Sorts the piped sequence using Python’s sorted function. NOTE: There are many useful and searchable parameters for this function. |
{{ [13, 42, 52, 35, 63] | sort }} → [13, 35, 42, 52, 63] {{ "Paradox" | sort }} → ['a', 'a', 'd', 'o', 'P', 'r', 'x'] |
Standard | | sort |
| strftime |
Formats the piped timestamp to the given format. NOTE: Bad timestamp inputs will be returned the same as they came in. Can also accept a time zone string as a second parameter. Incorrect given timezone will default to UTC. %d: Returns the day of the month, from 1 to 31. %m: Returns the month of the year, from 1 to 12. %Y: Returns the year in four-digit format (Year with century). like, 2021. %y: Returns year in two-digit format (year without century). like, 19, 20, 21 %A: Returns the full name of the weekday. Like, Monday, Tuesday %a: Returns the short name of the weekday (First three character.). Like, Mon, Tue %B: Returns the full name of the month. Like, June, March %b: Returns the short name of the month (First three character.). Like, Mar, Jun %H: Returns the hour. from 01 to 23. %I: Returns the hour in 12-hours format. from 01 to 12. %M: Returns the minute, from 00 to 59. %S: Returns the second, from 00 to 59. %f: Return the microseconds from 000000 to 999999 %p: Return time in AM/PM format %c: Returns a locale’s appropriate date and time representation %x: Returns a locale’s appropriate date representation %X: Returns a locale’s appropriate time representation %z: Return the UTC offset in the form ±HHMM[SS[.ffffff]] (empty string if the object is naive). %Z: Return the Time zone name (empty string if the object is naive). %j: Returns the day of the year from 01 to 366 %w: Returns weekday as a decimal number, where 0 is Sunday and 6 is Saturday. %U: Returns the week number of the year (Sunday as the first day of the week) from 00 to 53 %W: Returns the week number of the year (Monday as the first day of the week) from 00 to 53 Africa/Abidjan |
{{ 1657144099 | strftime("%Y-%m-%d") }} → "2022-07-06" {{ 1657144475 | strftime("%d-%m-%y, %H:%M:%S", "US/Mountain") }} → "06-07-22, 15:54:35" |
Custom | | strftime("___FORMAT_STRING___") |
| string | Converts the piped string to unicode. | {{ "På®∂øx" | string }} → "På®∂øx" | Standard | | string |
| striptags | Strips SGML/XML tags and replaces adjacent whitespace with a single space. | {{ "\n <h1>Paradox </h1> " | striptags }} → "Paradox" | Standard | | striptags |
| strptime |
Parses a time object from the piped string using the given string format. NOTE: If the given string format does not properly correspond to the piped string, the piped string will be returned. %d: Returns the day of the month, from 1 to 31. %m: Returns the month of the year, from 1 to 12. %Y: Returns the year in four-digit format (Year with century). like, 2021. %y: Returns year in two-digit format (year without century). like, 19, 20, 21 %A: Returns the full name of the weekday. Like, Monday, Tuesday %a: Returns the short name of the weekday (First three character.). Like, Mon, Tue %B: Returns the full name of the month. Like, June, March %b: Returns the short name of the month (First three character.). Like, Mar, Jun %H: Returns the hour. from 01 to 23. %I: Returns the hour in 12-hours format. from 01 to 12. %M: Returns the minute, from 00 to 59. %S: Returns the second, from 00 to 59. %f: Return the microseconds from 000000 to 999999 %p: Return time in AM/PM format %c: Returns a locale’s appropriate date and time representation %x: Returns a locale’s appropriate date representation %X: Returns a locale’s appropriate time representation %z: Return the UTC offset in the form ±HHMM[SS[.ffffff]] (empty string if the object is naive). %Z: Return the Time zone name (empty string if the object is naive). %j: Returns the day of the year from 01 to 366 %w: Returns weekday as a decimal number, where 0 is Sunday and 6 is Saturday. %U: Returns the week number of the year (Sunday as the first day of the week) from 00 to 53 %W: Returns the week number of the year (Monday as the first day of the week) from 00 to 53 Africa/Abidjan |
{{ "26 March, 2020" | strptime("%d %B, %Y") }} → 2020-03-26 00:00:00 {{ "Dec 25 2021, at 7:30 am" | strptime("%b %d %Y, at %H:%M am") }} → 2021-12-25 07:30:00 |
Custom | | strptime("___FORMAT_STRING___") |
| strptime_to_timestamp |
Returns a UTC timestamp given a time string and the format said time is in. NOTE: Returns the current UTC timestamp if the piped string is not valid. %d: Returns the day of the month, from 1 to 31. %m: Returns the month of the year, from 1 to 12. %Y: Returns the year in four-digit format (Year with century). like, 2021. %y: Returns year in two-digit format (year without century). like, 19, 20, 21 %A: Returns the full name of the weekday. Like, Monday, Tuesday %a: Returns the short name of the weekday (First three character.). Like, Mon, Tue %B: Returns the full name of the month. Like, June, March %b: Returns the short name of the month (First three character.). Like, Mar, Jun %H: Returns the hour. from 01 to 23. %I: Returns the hour in 12-hours format. from 01 to 12. %M: Returns the minute, from 00 to 59. %S: Returns the second, from 00 to 59. %f: Return the microseconds from 000000 to 999999 %p: Return time in AM/PM format %c: Returns a locale’s appropriate date and time representation %x: Returns a locale’s appropriate date representation %X: Returns a locale’s appropriate time representation %z: Return the UTC offset in the form ±HHMM[SS[.ffffff]] (empty string if the object is naive). %Z: Return the Time zone name (empty string if the object is naive). %j: Returns the day of the year from 01 to 366 %w: Returns weekday as a decimal number, where 0 is Sunday and 6 is Saturday. %U: Returns the week number of the year (Sunday as the first day of the week) from 00 to 53 %W: Returns the week number of the year (Monday as the first day of the week) from 00 to 53 |
{{ "2005-03-26" | strptime_to_timestamp("%Y-%m-%d") }} → 1111795200 | Custom | | strptime_to_timestamp("___FORMAT_STRING___") |
| sum | Returns the sum of the piped list. | {{ [43, 35, 22] | sum }} → 100 | Standard | | sum |
| title | Returns a title-cased version of the piped string. | {{ "paradox olivia" | title }} → "Paradox Olivia" | Standard | | title |
| tojson | Converts the piped JSON structure into a safe JSON string. | {{ {"firstName": "Brent","lastName": "Julius"} | tojson }} → {"firstName": "Brent", "lastName": "Julius"} | Standard | | tojson |
| trim |
Strips leading and trailing whitespace. NOTE: Can be given characters other than whitespace to trim. |
{{ " \n Paradox Olivia \t" | trim }} → "Paradox Olivia" | Standard | | trim |
| truncate |
Restricts the piped string to a given length and appends an ellipses. NOTE: Default length is 255, parameters can be added to cut at the exact length given. |
{{ "Olivia can help you with many different tasks." | truncate(21) }} → "Olivia can help..." {{ "Olivia can help you with many different tasks." | truncate(21, killwords="false") }} → "Olivia can help yo..." |
Standard | | truncate(___LENGTH___) |
| upper | Converts all applicable characters in the piped sequence to uppercase. | {{ "Paradox Olivia" | upper }} → "PARADOX OLIVIA" | Standard | | upper |
| unidecode | Decodes unicode values into standard characters. | {{ "Påradøx" | unidecode }} → "Paradox" | Custom | | unidecode |
| unique | Returns a list of all unique values in the piped sequence. |
{{ [23, 21, 23, "Paradox", 10, "Paradox"] | unique | join(", ") }} → "23, 21, Paradox, 10" {{ "Paradox Olivia" | unique | join("") }} → "Pardox liv" {{ [23, 21, 23, "Paradox", 10, "Paradox"] | unique | list }} → [23, 21, 'Paradox', 10] {{ "Paradox Olivia" | unique | list }} → "['P', 'a', 'r', 'd', 'o', 'x', ' ', 'l', 'i', 'v'] |
Standard | | unique |
| urlencode | URL encodes the piped string. | {{ ""<Paradox Olivia\n\t" | urlencode }} → "%22%3CParadox%20Olivia%0A%09" | Standard | | urlencode |
| urlize | Converts plain-text URL’s into clickable links. | {{ "https://www.paradox.ai/" | urlize }} → "<a href="https://www.paradox.ai/" rel="noopener noreferrer">https://www.paradox.ai/</a>" | Standard | | urlize |
| wordcount | Returns the number of words in the piped string. | {{ "paradox olivia" | title }} → "Paradox Olivia" | Standard | | wordcount |
| wordwrap |
Wraps the piped string to the given width. NOTE: Existing newlines are treated as paragraphs to be wrapped separately. |
{{ "Olivia can help you with many different tasks." | wordwrap(10) }} → "Olivia\ncan\nhelp you\nwith many\ndifferent\ntasks." | Standard | | wordwrap(___WIDTH___) |
| xmlattr | Converts a dictionary into a string formatted as XML attributes. | {{ {"firstName": 'Brent', "lastName": 'Julius'} | xmlattr }} → "lastName=\"Julius\" firstName=\"Brent\"" | Standard | | xmlattr |
Complex Examples and Jinja Snippets
Using Split and a For Loop with an IF condition.
I have an attribute being stored as “value1 and value2”, due to a multiple choice list select question in conversation builder. I need to parse this out, and pass each value individually into a payload for a repeatable element. Going this route means I don’t have to worry about how many options are potentially selected.
My initial value in the “tl_languages” attribute value is “English and Spanish”
Using
{% set languages = tl_languages.split(' and ') %}
{%- if languages -%}
{% for languages in languages %}
{
"value":"{{languages|lower}}"
}
{%- if not loop.last -%}
,
{% endif %}
{% endfor %}
{% endif %}Results in:
{
"value":"english"
},
{
"value":"spanish"
}
Multiple options can be selected.
Extract full name from capture conversation:
{%- set full_name = __conversation
| selectattr("label", "in", "Greeting and Full name Nombre")
| map(attribute="answer_text") | list | last
%}
{
"first_name": "{{ full_name.split(' ', 1)[0] if full_name else first_name }}",
"last_name": "{{ full_name.split(' ', 1)[1] if full_name else last_name }}"
}Format conversation into string transcript:
{
"notes": "AI Conversation Transcript\n {% for item in __conversation
%}Olivia: {{item.message_question_text | regex_replace('\n|"', ' ')}}\n{%
if item.answer_text
%}{{first_name}}: {{item.answer_text | regex_replace('\n|"', ' ')}}\n{%
endif
%}{%
endfor
%}"
}Date Diff for Age:
{% set birth_date = "2002-02-01" %}
{% set ONE_YEAR = 31536000 %}
{% set dob_timestamp = birth_date | strptime_to_timestamp("%Y-%m-%d") %}
{% set years_old = (__current_timestamp - dob_timestamp) // ONE_YEAR %}
years_old: {{years_old}}Generate a Random GUID:
Input
{%- macro random_string(len) -%}
{%- for i in range(0,len) -%}{{ [0,1,2,3,4,5,6,7,8,9,"a","b","c","d","e","f"]|random }}
{%- endfor -%}
{%- endmacro -%}
{%- macro random_guid() -%}{{ random_string(8) + "-" + random_string(4) + "-" + random_string(4) + "-" + random_string(4) + "-" + random_string(12) }}{%- endmacro -%}
{%- set myGUID = random_guid() -%}
"test": "{{myGUID}}"Output
"test": "9ea92b4a-f1d6-7f22-bb39-cbd8f2e2ed0b"Get a recruiter’s employee ID:
{{ __hiring_team_users | rejectattr('acl_role', 'in', ['Hiring Manager - Global', 'Hiring Manager']) | map(attribute='employee_id') | first }}- rejectattr - Filter out users from the array who have the role Hiring Manager
- Map Attribute - Makes an array of the just the attribute specified
- First - get the first in the array
Convert Array to comma separated list:
"interviewer_emails":"{% for user in interviewList %}{{user}}{% if not loop.last %}, {% endif %}{% endfor %}""Extract Country Code:
{% set phone_country_code, phone_country_code_str, phone_national_number = phone_number|extract_phone_number %}If-any / IfOR logic
{% if degree in [ "N/a", "Declined", "Omitir", "No"] %}
{%else%}
{{job_loc_code | mapvalue('number_list')}}
{%endif%}
Using this logic, if any of the strings in the [list] match the response provided by a candidate, nothing will be sent. Provided the candidate provides an answer that is not contained in the list, the value will be sent as a part of the integration. This is useful in accounts which use several different languages to answer the same questions.
Choose between two different mapped values lists
{% if job_loc_code in [ "ABC", "BCD", "CDE"] %}
{{job_loc_code | mapvalue('alphabet_list')}}
{%else%}
{{job_loc_code | mapvalue('number_list')}}
{%endif%}
Common Regex examples
Remove All but Alphabet and Spaces (remove special characters)
{{attribute | regex_replace("[^a-zA-Z ]+","")}}Remove All but Alphabet
{{attribute | regex_replace("[^a-zA-Z]+","")}}Remove All but Digits
{{attribute | regex_replace("[^0-9]","")}}Remove All but Digits and Alphabet
{{attribute | regex_replace ("[^A-Za-z0-9]","")}}Remove Special Characters
{{attribute | regex_replace("[%\[~!@$%;:^,\"\]%\'-]","")}}Remove all but digits, $, .
{{attribute | regex_replace("[^0-9.]","")}}Python String methods
Unlike Jinja Filters, Python String Methods must be called using dot notation.
| Method | Description | Example | Imported String |
|---|---|---|---|
| count | Returns the number of times a given value occurs in a string. | {{ "Paradox Olivia".count("a") }} → 3 | .count("___SUBSTRING___") |
| encode |
Returns an encoded version of the string. NOTE: Defaults to utf-8 |
{{ "Paradox Olivia".encode("utf-16") }} → "b'\xff\xfeP\x00a\x00r\x00a\x00d\x00o\x00x\x00 \x00O\x00l\x00i\x00v\x00i\x00a\x00'" | .encode("___CODE___") |
| endswith | Returns whether the string ends with a given value not. | {{ "Paradox Olivia".endswith("via") }} → True | .endswith("___SUBSTRING___") |
| find |
Searches the string for a given substring and returns the first index it is found at. NOTE: Returns -1 if substring is not found. |
{{ "Paradox Olivia".find("a") }} → 1 | .find("___SUBSTRING___") |
| format | Formats given values into a string. | {{ "Paradox Olivia {} {}".format("is revolutionizing", "HR Tech") }} → "Paradox Olivia is revolutionizing HR Tech" | .format("___STRING_TO_INSERT___") |
| format_map | Formats specified values in a string. | {{ "Paradox Olivia is {age} years old as of {year}".format_map({"age": 6, "year": 2022}) }} → "Paradox Olivia is 6 years old as of 2022" | .format_map(___DICTIONARY___) |
| isalnum | Returns whether all characters in the string are alphanumeric. | {{ "Paradox5Olivia".isalnum() }} → True | .isalnum() |
| isalpha | Returns whether all characters in the string are in the alphabet. | {{ "Paradox Olivia".isalpha() }} → False | .isalpha() |
| isdigit | Returns whether all characters in the string are digits. | {{ "X_2432".isdigit() }} → False | .isdigit() |
| isidentifier | Returns whether the string consists only of [A-z), [0-9], and “_”. | {{ "Paradox_Olivia".isidentifier() }} → True | .isidentifier() |
| islower | Returns whether all characters in the string are lower case. | {{ "Paradox Olivia".islower() }} → False | .islower() |
| isprintable | Returns whether the string contains a backslash. | {{ "Paradox\nOlivia".isprintable() }} → False | .isprintable() |
| isspace | Returns whether all characters in the string are whitespaces. | {{ "Paradox Olivia".isspace() }} → False | .isspace() |
| istitle | Returns whether the string follows the rules of a title. | {{ "Paradox Olivia".istitle() }} → True | .istitle() |
| isupper | Returns whether all characters in the string are upper case. | {{ "Paradox Olivia".isupper() }} → False | .isupper() |
| ljust | Returns a left justified version of the string. | {{ "Paradox Olivia".ljust(20) }} → "Paradox Olivia " | .ljust(___JUSTIFY_WIDTH___) |
| lstrip |
Removes any whitespace from the left side of the string. NOTE: Can be given characters as a parameter. |
{{ " Paradox Olivia ".lstrip() }} → "Paradox Olivia " | .lstrip() |
| partition | Returns a three-tuple of the split at the given substring. | {{ "Paradox Olivia".partition("x O") }} → ('Parado', 'x O', 'livia') | .partition("___SUBSTRING___") |
| replace | Returns a string where all instances of a value are replaced with another value. | {{ "Paradox Olivia".replace("a", "WOW") }} → "PWOWrWOWdox OliviWOW" | .replace("___SUBSTRING_TO_REPLACE___", "___SUBSTRING_TO_INSERT___") |
| rfind |
Searches the string for a substring and returns the first index of the last position in which it was found. NOTE: Returns -1 if substring is not found. |
{{ "Paradox Olivia Grades".rfind("ra") }} → 16 | .rfind("___SUBSTRING___") |
| rjust | Returns a right justified version of the string. | {{ "Paradox Olivia".rjust(20) }} → " Paradox Olivia" | .rjust(___JUSTIFY_WIDTH___) |
| rstrip |
Removes any whitespace from the right side of the string. NOTE: Can be given characters as a parameter. |
{{ " Paradox Olivia ".rstrip() }} → " Paradox Olivia" | .rstrip() |
| split | Splits the string into a list using the given delimiter. | {{ "Paradox Olivia".split(" ") }} → ['Paradox', 'Olivia'] | .split("___DELIMITER___") |
| splitlines | Splits the string into a list using line breaks. | {{ "Paradox Olivia\nHRTech Hiring".splitlines() }} → ['Paradox Olivia', 'HRTech Hiring'] | .splitlines() |
| startswith | Returns whether the string starts with the given substring. | {{ "Paradox Olivia".startswith("Par") }} → True | .startswith("___SUBSTRING___") |
| swapcase | Swaps the cases of all characters. | {{ "Paradox Olivia".swapcase() }} → "pARADOX oLIVIA" | .swapcase() |
| zfill | Fills the string with leading zeros up to the given width. | {{ "2302".zfill(8) }} → "00002302" | .zfill(___WIDTH___) |
DSL methods
These are to be called in the Response Mapping section of the Integration Center.