Clojure

promote contrib string

Details

  • Type: Enhancement Enhancement
  • Status: Closed Closed
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: Release 1.2
  • Component/s: None
  • Labels:
    None
  • Approval:
    Ok

Description

Promote the following from clojure.contrib.string to a new namespace, clojure.string

  • join
  • chop
  • chomp
  • split (fix perf, return vector)
  • replace (subsumes all replace- variants)
  • replace-first (subsumes all replace-first- variants)
  • reverse
  • capitalize
  • upper-case
  • lower-case
  • trim

Where necessary, change fns to take the string as first arg

Issues raised on mailing list:

  • perf test, particularly join
  • design guidelines for when nil works
  • arg order / point-free style?
  • trim options
  • trim modifiers at end

Activity

Hide
Assembla Importer added a comment -
Show
Assembla Importer added a comment - stu said: [file:aColQyBFar36SeeJe5cbCb]
Hide
Assembla Importer added a comment -
Show
Assembla Importer added a comment - stu said: [file:cggc9eBOOr34uaeJe5cbCb]
Hide
Assembla Importer added a comment -

stu said: Second patch subsumes first, thanks Sean Devlin for the review!

Show
Assembla Importer added a comment - stu said: Second patch subsumes first, thanks Sean Devlin for the review!
Hide
Assembla Importer added a comment -

stuart.sierra said: Request: retain the type-specific, performant versions of replace[-first]-str/char/re/by. Consider making "replace" a multimethod, or at least add to doc string that it is not performant.

Show
Assembla Importer added a comment - stuart.sierra said: Request: retain the type-specific, performant versions of replace[-first]-str/char/re/by. Consider making "replace" a multimethod, or at least add to doc string that it is not performant.
Hide
Assembla Importer added a comment -

stuart.sierra said: Halloway says the type-checking 'replace' peforms on par with the type-specific fns, so I retract my request.

Show
Assembla Importer added a comment - stuart.sierra said: Halloway says the type-checking 'replace' peforms on par with the type-specific fns, so I retract my request.
Hide
Assembla Importer added a comment -
Show
Assembla Importer added a comment - stu said: [file:dZkYPeB08r36cLeJe5cbLr]
Hide
Assembla Importer added a comment -

stu said: Third patch susbumes others and adds a few fns that Stuart Sierra really wanted.

Show
Assembla Importer added a comment - stu said: Third patch susbumes others and adds a few fns that Stuart Sierra really wanted.
Hide
Assembla Importer added a comment -

importer said: (In [[r:b7f211356c27ba099f3dbe116539dbd9efa421df]]) string perf tweaks, tests #359

Signed-off-by: Stuart Halloway <stu@thinkrelevance.com>

Branch: master

Show
Assembla Importer added a comment - importer said: (In [[r:b7f211356c27ba099f3dbe116539dbd9efa421df]]) string perf tweaks, tests #359 Signed-off-by: Stuart Halloway <stu@thinkrelevance.com> Branch: master
Hide
Assembla Importer added a comment -

stu said: Updating tickets (#327, #359, #360, #361, #362)

Show
Assembla Importer added a comment - stu said: Updating tickets (#327, #359, #360, #361, #362)

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: