Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I see. I haven't gotten to the encoding page yet, but that sounds perfectly reasonable to me.

Small question before I get there, I imagine that such things are tagged with a length so that you can actually determine where the text field really ends then?



Yes. The actual getter for a Text field returns StringPtr, which is a simple pointer-length pair. If you want to pass that on to a C-style function you call .cStr(), with the caveat that the content is effectively truncated at the first NUL char.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: