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 has been 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.
Further info: I'm using LightTable 0.6.5, binary 0.8.4, Clojure 1.6.0 and Java 1.7.0_51 under Ubuntu 13.04. Attached is a screenshot of the inline output.
There may be a quick fix here by putting the inline results into a
tag instead of a
, but I'd have to dig deeper to be sure,
On Wed, Oct 22, 2014 at 12:21 PM, Gabriel Horner [email protected]
wrote:
I've experienced this white space munging in inline results as well. For
example: (identity " ") (3 spaces) appears as " " (1 space).
—
Reply to this email directly or view it on GitHub #16 (comment).
Screw the environment. Please print this email immediately. And then burn
it.
cldwalker
changed the title
Inline display of some string contents appears incorrect
Inline display of multiple leading/trailing spaces are collapsed to a single one
Mar 11, 2015
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
The text was updated successfully, but these errors were encountered: