Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
Cython / tests / run / cpp_stl_string_cpp11.pyx
Size: Mime:
# mode: run
# tag: cpp, werror, cpp11

from libcpp.string cimport string

b_asdf = b'asdf'

def test_element_access(char *py_str):
    """
    >>> test_element_access(b_asdf)
    ('a', 'f')
    """
    cdef string s
    s = string(py_str)
    return chr(s.front()), chr(s.back())