bpod_core.misc.sanitize_string
- bpod_core.misc.sanitize_string(string, substitute='_')
Replace non-alphanumeric characters in a string with a given substitute.
- Parameters:
- Returns:
A sanitized string where all non-alphanumeric characters have been replaced with the specified substitute.
- Return type:
- Raises:
TypeError – If either string or substitute is not an instance of
str
.