cortexflow_agent_api 0.1.2

CortexFlow agent API
Documentation
1
2
3
4
5
6
use crate::constants::TASK_COMM_LEN;

pub fn comm_to_string(comm: &[u8; TASK_COMM_LEN]) -> String {
    let end = comm.iter().position(|&c| c == 0).unwrap_or(comm.len());
    String::from_utf8_lossy(&comm[..end]).to_string()
}