Compare commits

...

3 Commits

  1. 16
      src/rustint/core.clj

@ -2531,6 +2531,7 @@
(defn especificador-formato [arg, rustf]
(cond
(char? arg) "%c"
(string? arg) "%s"
(int? arg) "%d"
(and (float? arg) (nil? rustf) (== (pasar-a-int arg) arg)) "%.0f"
@ -2544,13 +2545,10 @@
)
(defn replace-groups [string groups]
(if (empty? groups)
string
(
replace-groups
(clojure.string/replace-first string #"\{:?(.\d+)?\}" (first groups))
(rest groups)
)
(cond
(nil? groups) string
(empty? groups) string
:else (replace-groups (clojure.string/replace-first string #"\{:?(.\d+)?\}" (first groups)) (rest groups))
)
)
@ -2561,11 +2559,9 @@
(rest args)
(get-rust-formatters (first args))
)
] (if (empty? clojure-fspecifiers)
args
]
(cons (replace-groups (first args) clojure-fspecifiers) (rest args))
)
)
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Loading…
Cancel
Save