summaryrefslogblamecommitdiff
path: root/src/strings/zstring.py
blob: dca5f4e371d7eedd1c581994c7a3b61d3c11462a (plain) (tree)
1
2
3
4
5



                          
                                   












                                          
class ZString(object):
    ''' print a ZString
    '''
    __slots__ = ('_value')
    name = 'tmwa::strings::ZString'
    enabled = True

    def __init__(self, value):
        self._value = value

    def children(self):
        yield 'base', self._value['_base']

    def to_string(self):
        b = self._value['_b']['_ptr']
        e = self._value['_e']['_ptr']
        d = e - b
        return b.lazy_string(length=d)