pyxx.strings.str_includes_only#

pyxx.strings.str_includes_only(value: str, allowed_chars: str) bool#

Checks that a string contains only characters present in a specified set of characters

Parameters:
  • value (str) – String whose contents are to be analyzed

  • allowed_chars (str) – If value contains characters that are not in allowed_chars, the function should return False

Returns:

Returns True if value is composed of only characters found in allowed_chars, and False otherwise

Return type:

bool