FieldFlags.cast_extend_truncate
— Functioncast_extend_truncate(T::DataType, x) -> T
Takes an object x
of a primitive type and either bitcasts it to type T
(if their sizes are egal), zero extends the bitrepresentation of x
to the size of T
, or truncates the bitrepresentation of x
to sizeof(T)
.
Returns a T
.
See also FieldFlags.cast_or_extend
.