blob: 5031ff985178b63a88ed140082feb00a9deca23b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
class LString(object):
__slots__ = ('_value')
name = 'tmwa::strings::LString'
enabled = True
def __init__(self, value):
self._value = value
def to_string(self):
v = self._value
b = v['_b']['_ptr']
e = v['_e']['_ptr']
d = e - b
return b.lazy_string(length=d)
test_extra = '''
using tmwa::operator "" _s;
'''
tests = [
('""_s', '""'),
('"Hello, World!"_s', '"Hello, World!"'),
]
|