fn whitespace_cstring(len: usize) -> CString{

    // allocate buffer 
    let mut buffer: Vec<u8>= Vec::with_capacity(len as usize+1);
    // fill space iter() -> iter, cycle() -> fill cycle iter
    buffer.extend([b' '].iter().cycle().take(len as usize));
    // convert into CString
    unsafe{ CString::from_vec_unchecked(buffer)}
}
// convert String into CString for OpenGL error
convert String into CString for OpenGL error
convert String into CString for OpenGL error
fn whitespace_cstring(len: usize) -> CString{
    // allocate buffer 
    let mut buffer: Vec<u8>= Vec::with_capacity(len as usize+1);
    // fill space iter() -> iter, cycle() -> fill cycle iter
    buffer.extend([b' '].iter().cycle().take(len as usize));
    // convert into CString
    unsafe{ CString::from_vec_unchecked(buffer)}
}
fn whitespace_cstring ( len : usize ) -> CString { // allocate buffer  let mut buffer : Vec < u8 > = Vec :: with_capacity ( len as usize + 1 ) ; // fill space iter() -> iter, cycle() -> fill cycle iter buffer . extend ( [ b' ' ] . iter ( ) . cycle ( ) . take ( len as usize ) ) ; // convert into CString unsafe { CString :: from_vec_unchecked ( buffer ) } }
convert String into CString for OpenGL error
convert String into CString for OpenGL error
len
usize
len
usize