cljs.repl.browser/parse-file-line-column
function | removed v1.7.10 | added v0.0-3053 | Edit |
(parse-file-line-column flc)
(defn parse-file-line-column [flc]
(let [xs (string/split flc #":")
[pre [line column]]
(reduce
(fn [[pre post] [x i]]
(if (<= i 2)
[pre (conj post x)]
[(conj pre x) post]))
[[] []] (map vector xs (range (count xs) 0 -1)))
file (string/join ":" pre)]
[(cond-> file
(.startsWith file "(") (string/replace "(" ""))
(Long/parseLong
(cond-> line
(.endsWith line ")") (string/replace ")" "")))
(Long/parseLong
(cond-> column
(.endsWith column ")") (string/replace ")" "")))]))