summaryrefslogtreecommitdiff
path: root/src/strings/xstring.py
blob: 92cb78ba6a82c85dbc8c6372ccb7b2894a2aff92 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
class XString(object):
    ''' print a XString
    '''
    __slots__ = ('_value')
    name = 'strings::XString'
    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)