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