jmdavis
256976dddd
Removed "scheduled for deprecation" pragmas.
...
The pragmas have not been as effective as we might have liked, since
they only work with templates and can't tell you where in your code you
need to make changes, and they seemed to have been more annoying to
programmers than helpful, so we're going to discontinue them. We'll
leave them in for stuff that's actually been deprecated until deprecated
has been improved enough to take a message, but we'll leave "scheduled
for deprecation" messages to the documentation and changelog.
2011-10-23 23:11:17 -07:00
dsimcha
36a5a7373c
Make makeIndex work with all integer widths. Also, since finite random access ranges are required to have a length now anyhow, use a more efficient method of filling the index range that doesn't require iterating over the range to be sorted.
2011-10-14 21:10:49 -04:00
Brad Roberts
ceb2539352
reduce another import (only needed for tests)
2011-10-03 00:53:02 -07:00
Andrei Alexandrescu
c7ee2f5d2d
Acted on comments
2011-09-17 11:57:26 -05:00
Andrei Alexandrescu
85df36f7f4
Added multiSort
2011-09-10 20:18:53 -05:00
Andrei Alexandrescu
47db0fd804
Added multiSort
2011-09-10 18:56:13 -05:00
Andrei Alexandrescu
94cecaa6c1
Added partition3 algorithm
2011-09-10 17:55:50 -05:00
David Simcha
95ecfcfa4e
Add array specialization for copy.
2011-08-20 20:48:55 -03:00
jonathan.davis
3d559d88a8
Revert "Removed new, unnecessary overload of countUntil."
...
This reverts commit b1765dc0cb
.
Okay. So, I misread what count does and reverted my previous changes
prematurely. So I'm putting them back. count counts the number of
elements in the entire range which match the predicate, not just until
the predicate fails. So, it does _not_ do what the new overload of
countUntil does.
2011-08-15 14:27:17 -07:00
jmdavis
b1765dc0cb
Removed new, unnecessary overload of countUntil.
...
I missed the fact that count would do what I was trying to do, as did
dsimcha when he reviewed it. I left in the improvements to countUntil's
documentation though.
2011-08-14 20:01:43 -07:00
jmdavis
105d77f58a
Some improvements to std.algorithm.countUntil.
2011-08-14 04:30:27 -07:00
Dmitry Olshansky
37f224f86f
cmp apparently broken for non-strings
2011-08-08 15:56:43 +04:00
Dmitry Olshansky
ca379e5993
minor fixes that get GSOC regular expressions to compile
2011-08-08 15:30:45 +04:00
dsimcha
aa2a4077df
Fix a small bug in the just-merged pull request.
2011-07-12 20:49:57 -04:00
KennyTM~
5a2add5e7a
Fix bug 6301.
...
The following functions are modified to accept ranges with iota of longs:
* std.algorithm.map
* std.algorithm.splitter
* std.range.retro
* std.range.radial
* std.range.popBackN
* std.range.zip
* std.range.iota
* std.range.moveAt
2011-07-13 06:16:20 +08:00
jmdavis
7de549c1fa
Merged master into branch with changes to std.string.
...
Conflicts:
changelog.dd
std/array.d
2011-06-22 21:38:17 -07:00
jmdavis
0ca76972fe
Renamed toUniLower and toUniUpper to toLower and toUpper.
...
toUniLower and toUniUpper are now scheduled for deprecation.
2011-06-22 20:34:08 -07:00
jmdavis
e3f7c0c288
Renamed isUniWhite to isWhite.
2011-06-22 19:44:36 -07:00
jmdavis
cfedd9feb1
Merge branch 'master' into string
2011-06-19 18:48:48 -07:00
jmdavis
2d310e5e20
Changed the names of some of the std.ascii functions.
...
isWhite, isLower, isUpper, toLower, and toUpper now have Ascii in their
name, which matches what std.unit does with its versions of those
functions. Hopefully, it should also reduce bugs due to using the wrong
function between the ASCII and unicode versions by making the difference
more obvious.
2011-06-19 18:41:00 -07:00
dawg
449459a25d
fixup #5705
...
- don't do bitwise compare of structs but compare their memory locations
2011-06-20 00:36:28 +02:00
dawg
61ac0be324
fix overlapping array copy in swap #5705
2011-06-19 05:34:26 +02:00
jmdavis
fabd38658f
Merged master into branch with changes for std.string.
2011-06-18 03:10:50 -07:00
David Nadlinger
ca4162b363
Fixed findSkip doc example.
2011-06-14 22:56:28 +02:00
jmdavis
dd3a0c20a2
Created std.ascii to replace std.ctype.
...
All of the new, properly camelcased functions in std.ctype have been
moved to std.ascii, and std.ctype has been scheduled for deprecation.
2011-06-14 04:06:54 -07:00
jmdavis
30069ea6f0
Replaced calls to std.string and std.ctype's toupper with their toUpper counterparts.
2011-06-12 16:59:52 -07:00
jmdavis
654f35a677
Replaced calls to std.string and std.ctype's tolower with their toLower counterparts.
2011-06-12 16:59:52 -07:00
jmdavis
76e1cfd2e9
Replaced calls to std.ctype.isspace with std.ctype.isWhite.
...
In a few places, I replaced it with std.uni.isUniWhite, but for the most
part, I replaced it with std.ctype.isWhite.
2011-06-12 16:59:50 -07:00
Andrei Alexandrescu
ea8be4b3ee
Merge pull request #74 from dsimcha/master
...
Version 2 of sort optimizations
2011-06-09 08:23:00 -07:00
dsimcha
174b705bd5
Clean up getPivot() a little.
2011-06-08 22:36:29 -04:00
jmdavis
73283a87f2
Fix test compilation error on 64-bit.
2011-06-04 23:22:48 -07:00
andralex
5b5ec9651c
Fix unlisted bug in splitter revealed by TDPL example on page 8
2011-06-04 17:04:30 -05:00
jmdavis
b30a18a700
Adjustments to unit tests to reduce memory consumption.
2011-06-03 00:16:13 -07:00
jmdavis
d043103cde
Fixed startsWith and endsWith with regards to the default predicate and strings.
...
I also fixed std.string.icmp and std.algorithm.cmp, since they had
incorrect code for checking the default predicate.
2011-06-02 21:42:24 -07:00
dsimcha
0a40daaead
Optimize std.algorithm.sort: Round 2.
2011-06-02 22:20:25 -04:00
jmdavis
37c6a9313a
Fixed formatting and tweaked some unit tests.
...
I also updated the documentation of find and startsWith to be clearer
about what it does in the case where multiple arguments match.
2011-05-31 23:28:32 -07:00
jmdavis
126e255a6b
asnetha
2011-05-30 21:21:01 -07:00
jmdavis
fcb672f55f
Improved startsWith and endsWith.
...
1. startsWith and endsWith now have similar implementations.
2. They work with strings of different character sizes, whereas before
they treated strings as arrays regardless of whether they had the same
character size or not.
3. endsWith now actually works when mixing ranges and elements in the
endsWith portion like the documentation claims it does.
2011-05-30 04:13:27 -07:00
Andrej Mitrovic
0a073786ba
Fixed code sample for std.algorithm.remove.
2011-05-24 20:26:08 +02:00
Andrei Alexandrescu
d1d81245ea
Merge pull request #49 from kyllingstad/joiner-input-range
...
std.algorithm.joiner() should only require an input range
2011-05-16 07:12:10 -07:00
Lars T. Kyllingstad
c15062b1e8
Unittest for joiner() with non-forward range
2011-05-16 16:02:28 +02:00
Lars T. Kyllingstad
ae3cea46fd
joiner() should only require an input range
...
The template constraint for std.algorithm.joiner(r, sep) required a
forward range, when an input range would suffice. The one-argument
version of joiner() did not have this problem.
2011-05-16 15:49:22 +02:00
Lars T. Kyllingstad
dc352eaec9
Only define Until.save() forward ranges
...
std.algorithm.Until.save() was defined for all ranges, but should only
be defined when the underlying range is a forward range.
2011-05-16 15:36:01 +02:00
k-hara
b5e1dc36ef
Added unittests for issue 5661.
2011-05-06 01:43:16 +09:00
k-hara
fe90698c78
Issue 5661 - std.algorithm.move does not work on elaborate struct
2011-05-06 01:38:24 +09:00
dsimcha
fc3d63612d
Work around GDC's wrongness w.r.t. function argument evaluation order.
2011-04-27 20:33:22 -04:00
andralex
e9c639d1ff
Merge branch 'master' of https://github.com/torarin/phobos into testing-pull-request
2011-04-25 00:52:15 -05:00
Don Clugston
ca64cc2878
Trivial fix for broken algorithm.d unittest
...
In the existing compiler, using 'new int' inside a struct static initializer
is silently ignored.
2011-04-14 15:56:14 +08:00
torarin
ec2c8460a6
Replaced foreach loop in std.algorithm.equal with a for loop that calls popFront on both ranges. This ensures that code points are not compared with code units in conjunction with narrow strings.
2011-04-12 16:39:35 -07:00
Don Clugston
9ffdaa9058
Fix build break with std.algorithm.sort
...
Although the previous commit was correct, it requires my CTFE patch which
isn't yet in DMD. This is a quick patch to restore the build.
2011-04-12 05:34:22 +08:00