NameCharacterFilter

class ipkiss3.all.NameCharacterFilter

Filter for removing invalid characters from a string (e.g. PCell’s name.)

Works with a (positive) set of allowed characters, and replaces invalid characters with characters from a replacement dictionary or a default replacement character if the character is not in the replace_characters dictionary.

Parameters:
default_replacement: ( str and String that contains only ISO/IEC 8859-1 (extended ASCII py3) or pure ASCII (py2) characters ), optional

default character (or function) for characters that are not allowed

replace_characters: optional

dictionary with characters to be replaced

allowed_characters: ( str and String that contains only ISO/IEC 8859-1 (extended ASCII py3) or pure ASCII (py2) characters ), optional, *None allowed*

characters that are allowed in the name

name: ( str and String that contains only ISO/IEC 8859-1 (extended ASCII py3) or pure ASCII (py2) characters ), optional, *None allowed*