Details
-
Type:
Enhancement
-
Status:
Closed
-
Priority:
Trivial
-
Resolution: Declined
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
Description
Implement cljs.core/format. Make sure there is nothing in gclosure for this. I suppose we should try to emulate the jvm version as much as that makes sense?
Attachments
Activity
Michał Marczyk
made changes -
Field | Original Value | New Value |
---|---|---|
Attachment | 0001-CLJS-324-implement-cljs.core-format-as-wrapper-for-g.patch [ 11350 ] |
David Nolen
made changes -
Status | Open [ 1 ] | Resolved [ 5 ] |
Resolution | Completed [ 1 ] |
David Nolen
made changes -
Status | Resolved [ 5 ] | Closed [ 6 ] |
David Nolen
made changes -
Resolution | Completed [ 1 ] | |
Status | Closed [ 6 ] | Reopened [ 4 ] |
Lars Bohl
made changes -
Attachment | goog.string.format-0.0-1913.tgz [ 12318 ] |
David Nolen
made changes -
Priority | Major [ 3 ] | Minor [ 4 ] |
David Nolen
made changes -
Priority | Minor [ 4 ] | Trivial [ 5 ] |
David Nolen
made changes -
Resolution | Declined [ 2 ] | |
Status | Reopened [ 4 ] | Closed [ 6 ] |
GClosure does actually include a string formatter – goog.string.format. Note that that's both a non-ctor function name and the GClosure "namespace" name, so in order to use it one must require goog.string.format on top of gstring and say gstring/format (or perhaps leave out the gstring require spec and use goog.string/format – not tested, but should work).
The patch to introduce format and printf as wrappers for goog.string.format is naturally extremely simple, so here it is. Note that this particular patch must be applied on top of
CLJS-328.I have no idea how goog.string.format compares to the JVM's String/format (basic number formatting seems to work as it should in sprintf-like functions, but other than that I haven't tested it much).
CLJS-328. I have no idea how goog.string.format compares to the JVM's String/format (basic number formatting seems to work as it should in sprintf-like functions, but other than that I haven't tested it much).