anoia: %% is alias for string.formt

This commit is contained in:
Daniel Barlow 2024-08-24 13:56:54 +01:00
parent 5695c47496
commit 43612af71a
1 changed files with 3 additions and 0 deletions

View File

@ -88,6 +88,8 @@
;; return s:sub(1, #s-pad) .. rep('=', pad) ;; return s:sub(1, #s-pad) .. rep('=', pad)
;; end ;; end
(fn %% [fmt ...] (string.format fmt ...))
(fn base64url [s] (fn base64url [s]
"URL-safe Base64-encoded form of s (no trailing padding)" "URL-safe Base64-encoded form of s (no trailing padding)"
(let [pad (- 2 (% (- (# s) 1) 3)) (let [pad (- 2 (% (- (# s) 1) 3))
@ -118,4 +120,5 @@
: split : split
: system : system
: table= : table=
: %%
} }