FFI: more string helper functions