def pad
import bend-kit-webhooks@0.11.0.1/webhooks.bend as Webhooksimport Base
123# '=' up to a multiple of four chars.
124def pad(+s: String) -> String:
125 +r = (String.length(s) % 4n : Nat)
126 s ++ Bool.pick(String, Nat.is_eq(r, 2n), "==", Bool.pick(String, Nat.is_eq(r, 3n), "=", ""))