Commit c7138b3d authored by Robert Bradshaw's avatar Robert Bradshaw

test for char* slices

parent 7ab00c38
__doc__ = """
>>> do_slice("abcdef", 2, 3)
('c', 'cdef', 'ab', 'abcdef')
>>> do_slice("abcdef", 0, 5)
('abcde', 'abcdef', '', 'abcdef')
"""
def do_slice(s, int i, int j):
cdef char* ss = s
return ss[i:j], ss[i:], ss[:i], ss[:]
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment