Commit graph

4705 commits

Author SHA1 Message Date
H. S. Teoh
fe75e2da57 Implement toString that supports %f. 2013-08-27 15:06:59 -07:00
monarch dodra
a8250ba5ef Merge pull request #1524 from eco/patch-4
[trivial] Remove documentation quick link to deprecated indexOf
2013-08-27 01:01:16 -07:00
Andrei Alexandrescu
45ea7f08ea Merge pull request #1485 from blackwhale/ctr-lookback
Lookbehind in ctRegex
2013-08-26 15:23:41 -07:00
Brad Anderson
ea2479e4f8 [trivial] Remove documentation quick link to deprecated indexOf
indexOf was recently made undocumented to go along with its deprecation.  The handwritten quick index link remained though.
2013-08-26 11:52:56 -06:00
monarch dodra
f3e8844b3d Merge pull request #1522 from quickfur/issue10885
Add RefRange to ddoc overview (issue 10885)
2013-08-26 03:38:09 -07:00
Dmitry Olshansky
c37a5d865a lookbehind for ctRegex 2013-08-26 12:34:24 +04:00
monarch dodra
69ddf32feb Merge pull request #1520 from tom-tan/safe-pure-string-removechars
Make std.string.removechars @safe and pure
2013-08-26 00:06:44 -07:00
Andrei Alexandrescu
f5e57ee8b5 Merge pull request #1484 from blackwhale/kill-back-eval
std.regex: First step to lookbehind in ctRegex
2013-08-25 18:14:49 -07:00
H. S. Teoh
5b3b4b1cdc Add RefRange to ddoc overview. 2013-08-25 14:05:56 -07:00
Tomoya Tanjo
927c5914a1 Make std.string.removechars @safe and pure by using implicit conversion 2013-08-25 23:32:04 +09:00
Tomoya Tanjo
3851d825ec Make std.string.removechars @safe and pure 2013-08-25 22:52:13 +09:00
monarch dodra
09c8ebeeae Merge pull request #1519 from tom-tan/safe-pure-string-countchars
Mark std.string.countchars as @safe and pure
2013-08-25 06:09:18 -07:00
Tomoya Tanjo
16de84e260 Mark std.string.countchars as @safe and pure 2013-08-25 20:48:18 +09:00
Tomoya Tanjo
7755589d09 Mark std.string.inPattern as @safe and pure 2013-08-25 20:27:33 +09:00
monarch dodra
1d50b6298e Merge pull request #1513 from tom-tan/pure-string-justify
Mark leftJustify, rightJustify and center as pure
2013-08-25 00:21:58 -07:00
monarch dodra
3a3ca36340 Merge pull request #1496 from jerro/unix-domain-sockets
Fixed std.socket.UnixAddress
2013-08-25 00:06:40 -07:00
Tomoya Tanjo
11c559e822 Mark leftJustify, rightJustify and center as pure 2013-08-24 23:03:28 +09:00
Tomoya Tanjo
4498dbea84 Mark std.string.chop and its unittest as @safe and pure 2013-08-24 22:17:18 +09:00
monarch dodra
a184d6b484 Merge pull request #1505 from quickfur/issue10874
Issue 10874 - conv.to ulong to int enum conversion
2013-08-24 02:33:37 -07:00
monarch dodra
cbc684a001 Merge pull request #1504 from quickfur/bug6893
Issue 6893 - Write of enum member represented with ubyte or ulong
2013-08-24 01:44:59 -07:00
monarch dodra
a2c23948b6 Merge pull request #1510 from tom-tan/safe-pure-string-chompPrefix
Mark std.string.chompPrefix and its unittests as @safe and pure
2013-08-24 01:42:48 -07:00
monarch dodra
6d301e6678 Merge pull request #1508 from tom-tan/safe-pure-string-stripRight
Mark std.string.stripRight as @safe and pure
2013-08-24 01:42:02 -07:00
monarch dodra
a0dfcbcfad Merge pull request #1509 from tom-tan/safe-pure-string-strip
Mark std.string.strip and its unittests as @safe and pure
2013-08-24 01:41:13 -07:00
Tomoya Tanjo
707f53ef06 Mark std.string.chompPrefix and its unittests as @safe and pure 2013-08-24 14:28:15 +09:00
Tomoya Tanjo
cefdd9859d Mark std.string.strip and its unittests as @safe and pure 2013-08-24 12:23:44 +09:00
Tomoya Tanjo
aaeb96f4b2 Mark std.string.stripRight as @safe and pure 2013-08-24 12:07:31 +09:00
H. S. Teoh
d42e0eddec Add unittest for narrowing enum -> integral conversions. 2013-08-23 11:03:52 -07:00
H. S. Teoh
8f8587f677 Allow narrowing conversions of enum -> integral (int, short, etc.).
It will just throw at runtime if the value of the enum is too large.
2013-08-23 11:03:52 -07:00
H. S. Teoh
b680614e57 Add unittest for issue 6893. 2013-08-23 11:03:47 -07:00
Johannes Pfau
20a60cf6f3 Fix frexp for real == double targets 2013-08-23 09:47:41 +02:00
H. S. Teoh
8536853fc8 Fix issue 10874.
Don't assume that is(A : B) means a==b is valid, or that !is(A : B)
implies that a==b is invalid. Instead, test for a==b explicitly.

More specifically, int and ulong are ==-comparable, even though ulong is
not implicitly convertible to int. Thus, one should be able to convert
ulong to an int-based enum, but is(A : B) in the signature constraint
prohibits this. Testing for a==b explicitly, OTOH, makes this work.
2013-08-22 21:01:10 -07:00
Andrej Mitrovic
c3d694e0fe Add proper docs for return type of sformat. 2013-08-22 19:20:43 +02:00
Dmitry Olshansky
33c08b2f0f fix broken indention, detab 2013-08-21 00:28:11 +04:00
monarch dodra
5c9aba062c Merge pull request #1495 from tom-tan/safe-pure-unittest-for-stripLeft
Mark a unittest for std.string.stripLeft as @safe pure
2013-08-20 09:18:56 -07:00
ibuclaw
e778622f64 Fix floor/ceil for real==double targets. 2013-08-20 11:55:10 +01:00
Don Clugston
13cd90c1a9 Merge pull request #1426 from ibuclaw/puremath
True pure std.math
2013-08-20 00:11:55 -07:00
Jernej Krempuš
c3b1ac1c7d Made the fix apply to all unices and added a unit test. 2013-08-20 01:34:57 +02:00
monarch dodra
7bc6e81539 Merge pull request #1433 from ntrel/byLine-take
Fix Issue 9599 - File.byLine doesn't function properly with take
2013-08-19 10:50:12 -07:00
monarch dodra
5410c2d268 Merge pull request #1486 from tom-tan/safe-string-indexOf
Make std.string.indexOf @safe
2013-08-19 07:53:39 -07:00
Nick Treleaven
6de39acc16 Change foreach byLine example to use take
Also remove 'If Char is mutable' because (currently) Char can't be
immutable.
2013-08-19 15:24:01 +01:00
Nick Treleaven
dad4b53686 Don't let ByLine degenerate to a ByLineImpl 2013-08-19 15:23:59 +01:00
Nick Treleaven
ec1f0fdb9d Fix Issue 9599 - File.byLine doesn't function properly with take
Calling take could wrongly pop an extra line from the range.
Solved by making ByLine use reference-counting.

Note: Just changing ByLine not to eagerly read the next line was not
sufficient to handle all cases properly (plus that makes empty() less
efficient).

Note: ByLine was documented until recently.
2013-08-19 15:23:57 +01:00
Nick Treleaven
6061d747e4 Don't assume wrapped range has a const empty() 2013-08-19 15:23:55 +01:00
Nick Treleaven
8ff4bff0da Fix unreferencing ByLine.file once empty
The file handle was not released for an empty text file.
Also, do not pretend empty() is const.
2013-08-19 15:23:53 +01:00
Nick Treleaven
4c2a8bea35 Add unittest for issue 9599, plus some other byLine cases 2013-08-19 14:45:09 +01:00
Tomoya Tanjo
b1b00243e1 Mark a unittest for std.string.stripLeft as @safe pure 2013-08-19 22:02:13 +09:00
Tomoya Tanjo
937fe1fdb3 Mark std.string.splitLines as @safe pure 2013-08-19 21:39:37 +09:00
Tomoya Tanjo
f99a647139 Add cast to Char* 2013-08-19 20:34:41 +09:00
Jernej Krempuš
7006ac9d1f Made unix domain sockets work on Linux. 2013-08-18 22:32:55 +02:00
ibuclaw
88b44697bb Fixup std.math unittests for new math implementations. 2013-08-18 16:28:16 +01:00