You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 21, 2022. It is now read-only.
Recently came across an issue trying to right-pad a string using the clojure.core/format function and evaluating results inline.
Evaluating (format "%-9s" "12345") displays as "12345 " (6 characters) and appears to be padded with only 1 character, but (count (format "'%-9s'" "12345")) returns 9 which is the correct padded length. CLI REPL displays "12345 " and a count of 9 characters, which is correct.
Recently came across an issue trying to right-pad a string using the clojure.core/format function and evaluating results inline.
Evaluating (format "%-9s" "12345") displays as "12345 " (6 characters) and appears to be padded with only 1 character, but (count (format "'%-9s'" "12345")) returns 9 which is the correct padded length. CLI REPL displays "12345 " and a count of 9 characters, which is correct.
More detail in the google groups discussion here: https://groups.google.com/forum/#!topic/clojure/5njSatbtc2c