'When the ANSIString is first initialized, a few internal variables
have to be set.
The first is the parser. It is possible to replace Evennia\'s standard
ANSI parser with one of your own syntax if you wish, so long as it
implements the same interface.
The second is the _raw_string. It should be noted that the ANSIStrings
are unicode based. This seemed more reasonable than basing it off of
the string class, because if someone were to use a unicode character,
the benefits of knowing the indexes of the ANSI characters would be
negated by the fact that a character within the string might require
more than one byte to be represented. The raw string is, then, a
unicode object rather than a true encoded string. If you need the
encoded string for sending over the wire, try using the .encode()
method.
The third thing to set is the _clean_string. This is a unicode object
that is devoid of all ANSI Escapes.
Finally, _code_indexes and _char_indexes are defined. These are lookup
tables for which characters in the raw string are related to ANSI
escapes, and which are for the readable text.'

def __init__(self, *_, **kwargs):

    self.parser = kwargs.pop('parser', ANSI_PARSER)
    super(ANSIString, self).__init__()
    if (self._code_indexes is None):
        (self._code_indexes, self._char_indexes) = self._get_indexes()
