diff options
Diffstat (limited to 'docs/examples/tutorial/string/decode_cpp_string.pyx')
-rw-r--r-- | docs/examples/tutorial/string/decode_cpp_string.pyx | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/docs/examples/tutorial/string/decode_cpp_string.pyx b/docs/examples/tutorial/string/decode_cpp_string.pyx index 8f1d01af8..52861c209 100644 --- a/docs/examples/tutorial/string/decode_cpp_string.pyx +++ b/docs/examples/tutorial/string/decode_cpp_string.pyx @@ -1,10 +1,10 @@ -# distutils: language = c++
-
-from libcpp.string cimport string
-
-def get_ustrings():
- cdef string s = string(b'abcdefg')
-
- ustring1 = s.decode('UTF-8')
- ustring2 = s[2:-2].decode('UTF-8')
- return ustring1, ustring2
+# distutils: language = c++ + +from libcpp.string cimport string + +def get_ustrings(): + cdef string s = string(b'abcdefg') + + ustring1 = s.decode('UTF-8') + ustring2 = s[2:-2].decode('UTF-8') + return ustring1, ustring2 |