fix code that replaces format specifiers

master
CrossNox 3 years ago
parent f48f278b9f
commit 42b734d6c9
  1. 24
      src/rustint/core.clj

@ -2543,6 +2543,17 @@
(map last (re-seq #"\{:?(.\d+)?\}" s))
)
(defn replace-groups [string groups]
(if (empty? groups)
string
(
replace-groups
(clojure.string/replace-first string #"\{:?(.\d+)?\}" (first groups))
(rest groups)
)
)
)
(defn convertir-formato-impresion [args]
(let [clojure-fspecifiers (
map
@ -2552,18 +2563,9 @@
)
] (if (empty? clojure-fspecifiers)
args
(into
(rest args)
(list (clojure.string/join
(interleave
(clojure.string/split (first args) #"\{:?(\.\d+)?\}")
(concat clojure-fspecifiers '(""))
)
))
)
(cons (replace-groups (first args) clojure-fspecifiers) (rest args))
)
)
)
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Loading…
Cancel
Save