Skip to main content

pad_end

Function pad_end 

Source
pub fn pad_end<T>(
    arg: impl IntoExpr<T>,
    length: impl IntoExpr<i32>,
    fill: impl IntoExpr<String>,
) -> Expr<<T as StringUnaryExpr>::Output>
where T: StringUnaryExpr,
Expand description

Pads on the right to length by cycling fill, truncating the source on the right if needed. Padding "ab" to 5 with "xy" yields "abxyx"; empty fill adds nothing and non-positive length yields "". Maps to PostgreSQL RPAD.