Commit d6efd50f authored by Xavier Thompson's avatar Xavier Thompson

Implement string initialization from C char

parent d75f957a
...@@ -26,6 +26,9 @@ cdef cypclass Str "Cy_Str": ...@@ -26,6 +26,9 @@ cdef cypclass Str "Cy_Str":
__init__(self, const char *s): __init__(self, const char *s):
self._str = string(s) self._str = string(s)
__init__(self, const char c, int count = 1):
self._str = string(count, c)
size_t __len__(self): size_t __len__(self):
return self._str.size() return self._str.size()
......
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