Function c_str::from_c_multistring [] [src]

pub unsafe fn from_c_multistring<F>(
    buf: *const c_char,
    count: Option<usize>,
    f: F
) -> usize where
    F: FnMut(&CString), 

External iterator for a CString's bytes.

Use with the std::iter module. Parses a C "multistring", eg windows env values or the req->ptr result in a uv_fs_readdir() call.

Optionally, a count can be passed in, limiting the parsing to only being done count-times.

The specified closure is invoked with each string that is found, and the number of strings found is returned.