Skip to content
This repository was archived by the owner on Oct 21, 2022. It is now read-only.
This repository was archived by the owner on Oct 21, 2022. It is now read-only.

Inline display of multiple leading/trailing spaces are collapsed to a single one #16

Description

@pumbers

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions