--- layout: stdlib-reference --- # bitfieldInsert ## Description bitfieldInsert inserts the bits least significant bits of insert into base at offset offset. The returned value will have bits [offset, offset + bits + 1] taken from [0, bits - 1] of insert and all other bits taken directly from the corresponding bits of base. ## Signature
T bitfieldInsert<T>(
    T base,
    T insert,
    uint offset,
    uint bits);

## Generic Parameters #### T ## Parameters #### base : [T](bitfieldinsert-8.html#typeparam-T) #### insert : [T](bitfieldinsert-8.html#typeparam-T) #### offset : uint #### bits : uint