Commit graph

226 commits

Author SHA1 Message Date
Hara Kenji
c27262cdb9 Merge pull request #536 from Aatch/std-format-changes
Std format changes
2012-05-12 02:52:19 -07:00
Denis Shelomovskij
4430ee9a47 fix Issue 7975 - Incorrect quotes escaping in std.format 2012-04-23 19:45:22 +04:00
Andrei Alexandrescu
1b75b2b289 Merge pull request #231 from 9rnsr/fix6595
Issue 6595 - std.string.format() and sformat() are obsolete
2012-04-21 09:59:07 -07:00
James Miller
03673b188f Fixed up code 2012-04-20 19:09:32 +12:00
James Miller
ad092c3238 Fixed up singleSpec Documentation 2012-04-13 21:07:33 +12:00
James Miller
867d5e29d3 Adds singleSpec to std.format
Adds a helper function for geting the format spec for a single format
specifier
2012-04-13 20:58:55 +12:00
James Miller
cda3c079ee Improvements to std.format documentation 2012-04-13 20:12:12 +12:00
k-hara
9e37c2aecc fix Issue 7869 - Cannot format pointer of struct has toString member function 2012-04-09 14:32:23 +09:00
k-hara
affd4922f2 formattedWrite and formattedRead returns the number of formatted arguments 2012-04-09 02:13:00 +09:00
Andrei Alexandrescu
9273c74aa8 Merge branch 'master' of github.com:D-Programming-Language/phobos 2012-03-27 20:11:25 -06:00
H. S. Teoh
5f03c6b75d Add spacing to make example array output nicer. 2012-03-24 15:49:01 -07:00
H. S. Teoh
a27d82dc27 Document %( %| %) array formatting specifiers.
With juicy examples from Kenji Hara. :-)
2012-03-24 12:06:57 -07:00
Andrei Alexandrescu
b90e2835eb Merge pull request #488 from 9rnsr/fix_aliasthis_fmt
std.format improvement for alias this type interaction
2012-03-22 22:49:32 -07:00
Andrei Alexandrescu
31111228e5 Typos - thanks Paul D. Anderson 2012-03-17 11:37:22 -05:00
Don Clugston
94b7a1a3c7 Supplemental change required by 6681
A unittest in std.format has been relying on a CTFE bug.
Setting one field of a union, and then reading from another, is not
currently supported in CTFE.
2012-03-12 18:53:59 +01:00
k-hara
0f0875021b Fix std.format for the interaction with alias this 2012-03-12 16:00:00 +09:00
David Herberth
1c1e5887b2 added tests for bug 7628 2012-03-08 22:51:05 -08:00
David Herberth
7e92b35efa fixed formatValue conflict 2012-03-08 22:51:05 -08:00
k-hara
dd89d37fd2 Eliminate code duplication 2012-03-08 22:51:05 -08:00
k-hara
12571977d8 fix Issue 6892 - Formatted write with specified length of enum member 2012-03-08 22:51:04 -08:00
David Nadlinger
fa5250874c Better pointer format specifier mismatch message.
Fixes issue 7480.
2012-02-11 06:50:48 +01:00
Brad Anderson
261d804f0c Appender is in std.array, not std.range 2012-01-30 01:50:07 -07:00
k-hara
526469a0fc Issue 7241 - std.format can't read into array of dchar 2012-01-29 21:25:23 +09:00
k-hara
2dcd458b95 Remove workaround for CTFE. 2012-01-22 21:21:31 +09:00
k-hara
bc77d85ff3 The braces should be on its own line. 2012-01-22 21:21:20 +09:00
k-hara
1f228eadcf Replace enforce(false, ...) to throw statement. 2012-01-22 21:18:01 +09:00
k-hara
13d761a85a Fix comment 2012-01-22 21:09:37 +09:00
k-hara
cf6f608982 Use enforceEx instead enforce. 2012-01-22 21:06:21 +09:00
k-hara
d76b0e96dd Change manifest constant types from const(Char)[] to immutable(Char)[]. 2012-01-22 20:35:02 +09:00
k-hara
e7753a4789 CTFEable formatting 2012-01-21 00:56:38 +09:00
k-hara
322addb58e Use enforce 2012-01-21 00:56:38 +09:00
k-hara
6c80a510af Update for reflective formatting 2012-01-21 00:56:37 +09:00
k-hara
53c4dcc70f Add test for reflective formatting 2012-01-21 00:56:17 +09:00
k-hara
49b220321f Cleanup unit tests more functionally. 2012-01-21 00:56:16 +09:00
k-hara
010a94fc45 Mutable global variables in FormatSpec are not useful 2012-01-21 00:56:16 +09:00
k-hara
fe886cdb15 Cleanup AA formatting 2012-01-21 00:56:16 +09:00
k-hara
a1a4ee5309 Add support %( ... %| ... %) 2012-01-21 00:56:16 +09:00
k-hara
28a252616f Update ddoc 2012-01-21 00:56:16 +09:00
k-hara
51d02fce7c Issue 5354 - formatValue: range templates introduce 3 bugs related to class & struct cases 2012-01-21 00:56:16 +09:00
k-hara
3556d6323b Cleanup formatValue specializations 2012-01-21 00:56:15 +09:00
k-hara
8a87a161d0 Reorder definitions
formatValue and unformatValue use same order with template specialization.
2012-01-21 00:56:15 +09:00
k-hara
3578f189b0 Add support for val.toString(sink) 2012-01-21 00:56:15 +09:00
k-hara
1411d6c210 gotoCatch: Remove flag variable 2012-01-21 00:56:14 +09:00
k-hara
31a8f97423 Issue 7230 - Crash during printing anonymous union with writeln family functions. 2012-01-07 05:25:16 +09:00
Brad Roberts
ea27e2bcd6 enable std.format tests on 64 bit platforms, disabling just the two failing tests instead 2012-01-01 20:57:05 -08:00
Walter Bright
380ae65511 remove empty statements 2011-12-29 00:05:45 -08:00
Torarin
00bfb6873f Added auto ref to formatElement and formatValue to make them work with non-copyable structs. 2011-12-28 02:05:40 +01:00
David Nadlinger
e312f9898b Strict @property syntax compliance.
This enables the test suite to build with the -property switch enabled.

std.cpuid: vendor()/processor() have not been converted to properties in accordance to core.cpuid.
std.xml: Element.text() cannot be a property due to the optional parameter.
2011-12-04 09:56:14 +01:00
Peter Alexander
8eb953ef1e Raw write fix and more appropriate function names.
Moved the raw write back into formatValue as it
would cause issues on big endian systems. Also
renamed formatInt to formatIntegral and formatUInt
to formatUnsigned to better signify their purpose.
2011-12-03 13:01:02 +00:00
Peter Alexander
685ebcdaea Size optimisations on std.format
std.format.formatValue was duplicating a lot of
code when formatting various sized, signed and 
unsigned ints, so I shuffled the templates around
to re-use more code. For a Hello World program on
OSX x86 this saved me ~7KB.
2011-12-02 20:50:32 +00:00