Function std::ptr::position

pub unsafe fn position<T>(buf: *T, f: &fn(&T) -> bool) -> uint

Return the first offset i such that f(buf[i]) == true.