The string_utils module.

This module implements string functions.

New at 0.5

  1. Relocated to subfilter.utils.

  2. subfilter.utils.string_utils.get_string_index() replaces subfilter.find_var().

Detailed Module Contents

The entire module is documented below.

Created on Wed Jul 28 12:20:38 2021

@author: Todd Jones

subfilter.utils.string_utils.get_string_index(strings, substrings, exact=False)
Searches for the first index in list of strings that contains substr string

anywhere or, if exact=True, contains an exact match

Parameters
  • strings – List of strings to be searched

  • substrings – List of strings to be found in strings

  • exact – (bool, optional) Whether to perform search for exact match

Returns

first index of match, or None, if not found

Return type

tuple of integers

@author: Todd Jones and Peter Clark