menu_logo

menu_view_template done edit menu_subscribe menu_add menu_publish iOS Create Account Login
menu_clear
  • menu_insert_row
  • menu_delete_row
  • menu_insert
  • menu_share_template
  • menu_share_results
  • menu_duplicate
  • menu_view_source
  • menu_view_calc_log
  • menu_settings
  • menu_tags
  • help
  • menu_profile
  • menu_log_out
menu_preview_only
details_tap
details_type
details_title

Math Functions: Strings Calculator

Math Functions: Strings

List of text string functions. Many functions include links to more in-depth descriptions and examples. Note that strings cannot be solved in solving equations. Instead, create strings using direct computation only.
[https://.../t/help_variables_strings|Learn more about strings as variables.]
__These functions are only available in templates.__

Creating Strings

" "

To create a variable as a string, assign the variable to "" or a quoted string. See the [https://.../t/help_variables_string | String Variables] section for more details on creating date variables.
**Details**
- Strings begin and end with quote marks " "
- Quote marks can be used within strings if escaped with a back slant: \"

Substring

++substring("string"; start)++ : returns a portion of 'string' starting at index 'start' through the end of the string
++substring("string"; start; end)++ : returns a portion of 'string' starting at index 'start' through 'end' inclusive
__This function is only available in templates.__
** Details**
- The first character in a string is index 1
- 'start' or 'end' less than 1 or greater than the number of characters will return a 'Parameter out of range' calculation error
- 'end' less than 'start' swaps 'start' and 'end'

Trim

++trim("string")++
Returns 'string' with any leading or trailing whitespace removed.
__This function is only available in templates.__
**Example**

String Information

Length

++length("string")++
Returns the number of characters in 'string'.
__This function is only available in templates.__

Index Of

++indexof("substring"; "string")++
Returns the position of the first occurrence of 'substring' within 'string' starting at the beginning of 'string'.
++indexof("substring"; "string"; index)++
Returns the position of the first occurrence of 'substring' within 'string' where a search begins at 'index' within 'string'.
__This function is only available in templates.__
**Details**
- The first character in a string is index 1
- Returns 0 if 'substring' is not found in 'string'
- Searches are case insensitive
- 'index' less than 1 or greater than the number of characters in 'string' will return a 'Parameter out of range' error

String Math

Addition

++"string 1" + "string 2"++
Combines 'string 1' and 'string 2' into a single string.
__This function is only available in templates.__
**Example**
[https://.../t/e38bbbe2640ddf8feb7a|Currency Conversions]

Keywords

-------------
""
Substring
substring()
Length
length()
Index Of
indexof()
Addition
+