/// Returns a Value truncated to length [new_size].
///
/// # Example
/// ```
/// use interp::values::*;
/// let val_4_4 = (Value::from(4, 16).unwrap()).truncate(4);
/// ```
Returns a Value truncated to length [new_size].
Returns a Value truncated to length [ new_size ] .
pub fn truncate(&self, new_size: usize) -> Value {
        let mut vec = self.vec.clone();
        vec.truncate(new_size);
        Value { vec }
    }
pub fn truncate ( & self , new_size : usize ) -> Value { let mut vec = self . vec . clone ( ) ; vec . truncate ( new_size ) ; Value { vec } }
Returns a Value truncated to length [new_size].
Returns a Value truncated to length [ new_size ] .
&self
new_size
usize
example
None