title: String in Cython functions
body: <p>I'd like to do this to pass a string to a Cython code:</p>
  
  <pre><code># test.py
  s = "Bonjour"
  myfunc(s)
  
  # test.pyx
  def myfunc(char *mystr):
      cdef int i
      for i in range(len(mystr)):           # error! len(mystr) is not the length of string
          print mystr[i]                    # but the length of the *pointer*, ie useless!
  </code></pre>
  
  <p>but as shown in comment, here it doesn't work as expected.</p>
  
  <hr>
  
  <p><strong>The only workaround I've found is passing also the length as parameter of <code>myfunc</code>. Is it correct? Is it <em>really</em> the simplest way to pass a string to a Cython code?</strong></p>
  
  <pre><code># test.py
  s = "Bonjour"
  myfunc(s, len(s))
  
  
  # test.pyx
  def myfunc(char *mystr, int length):
      cdef int i
      for i in range(length):  
          print mystr[i]       
  </code></pre>