Skip to main content

pad_start

Function pad_start 

Source
pub fn pad_start<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 left to length by cycling fill, truncating the source on the right if needed. Padding "ab" to 5 with "xy" yields "xyxab"; empty fill adds nothing and non-positive length yields "". Maps to PostgreSQL LPAD.