sidpy.base.string_utils.validate_list_of_strings

sidpy.base.string_utils.validate_list_of_strings(str_list, parm_name='parameter')[source]

This function is to be used when validating and cleaning a list of strings. Trims the provided strings. Errors in the strings will result in Exceptions

Parameters:
  • str_list (array-like) – list or tuple of strings

  • parm_name (str, Optional. Default = 'parameter') – Name of the parameter corresponding to this string list that will be reported in the raised Errors

Returns:

List of trimmed and validated strings when ALL objects within the list are found to be valid strings

Return type:

array-like