lst_auto_rta.utils.string.split_string_around_multiple_template_vars

lst_auto_rta.utils.string.split_string_around_multiple_template_vars(string: str, var_identifiers: List[str]) List[str][source]

Returns a list of substring in string, using var_identifier{…} as the delimiter for all var_identifier

Parameters:
  • string (str) – String to split.

  • var_identifiers (List[str]) – List of strings used to indicate the start of a template variable. For instance [“@”, “$”] means that “@{…}” and “${…}” will be used as delimiter to split the string.

Returns:

List of substrings in string, splitted using the template variables found with var_identifier as delimiter.

Return type:

List[str]