Commit graph

149 commits

Author SHA1 Message Date
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
David Nadlinger
858e1ce747 Out-of-bounds error in algorithm.sort assertion message. 2011-04-12 05:15:40 +08:00
David Nadlinger
516de1bd9c Fixed links to STL algorithms and HTML errors. 2011-04-06 15:54:17 +02:00
David Nadlinger
dda7f610a0 Minor algorithm cheatsheet fixes. 2011-04-06 13:03:40 +02:00
David Nadlinger
29884011ec Unified style of references in algorithm cheat sheet. 2011-04-06 12:36:33 +02:00
Andrei Alexandrescu
deebbe52c0 Fix Opera rendering issue 2011-04-05 23:54:41 -05:00
Andrei Alexandrescu
d527807016 doc fix 2011-04-05 23:36:25 -05:00
Andrei Alexandrescu
5071624851 Typo 2011-04-04 00:52:25 -05:00
Andrei Alexandrescu
3e6679b297 Improvements to std.range and std.algorithm 2011-04-04 00:44:59 -05:00
Andrei Alexandrescu
c3b7665a42 Merge branch 'work' of github.com:andralex/phobos into work
Conflicts:
	posix.mak
	std/algorithm.d
	std/conv.d
	std/datetime.d
	std/range.d
2011-02-27 15:25:59 -06:00
Andrei Alexandrescu
1083bd4e7b One pass through std.range and friends
* Made emplace faster and replaced calls to it to also make them faster.

* Replaced phobos.d in posix.mak with index.d.

* Added version=StdDdoc to documentation build in posix.mak, and replaced uses of D_Ddoc with it.

* Improved documentation target in posix.mak (target dir automatically created).

* Added nice documentation table and cheat sheet at the top of std.algorithm.

* Replaced a few helper structs in std.range and std.algorithm with local structs, which simplify matters a fair amount.

* Added more constraints to functions in std.algorithm (still work in progress).

* Improved error message in std.algorithm.sort in case of failure to sort.

* std.random.dice(1, 10) now works (no need for array notation std.random.dice([1, 10])).

* Fixed documentation bugs and insufficiencies in std.range (still more to do).

* Improved speed of walkLength.

* Simplified retro.

* Simplified and optimized stride. Also folded stride(stride(r, a), b) into stride(r, a * b).

* Added roundRobin to std.range, which as a perk simplified radial.

* Added takeOne and takeNone to std.range.

* Added unsigned to std.traits.
2011-02-27 12:38:49 -06:00
Andrei Alexandrescu
78b3f24604 One pass through std.range and friends
* Made emplace faster and replaced calls to it to also make them faster.

* Replaced phobos.d in posix.mak with index.d.

* Added version=StdDdoc to documentation build in posix.mak, and replaced uses of D_Ddoc with it.

* Improved documentation target in posix.mak (target dir automatically created).

* Added nice documentation table and cheat sheet at the top of std.algorithm.

* Replaced a few helper structs in std.range and std.algorithm with local structs, which simplify matters a fair amount.

* Added more constraints to functions in std.algorithm (still work in progress).

* Improved error message in std.algorithm.sort in case of failure to sort.

* std.random.dice(1, 10) now works (no need for array notation std.random.dice([1, 10])).

* Fixed documentation bugs and insufficiencies in std.range (still more to do).

* Improved speed of walkLength.

* Simplified retro.

* Simplified and optimized stride. Also folded stride(stride(r, a), b) into stride(r, a * b).

* Added roundRobin to std.range, which as a perk simplified radial.

* Added takeOne and takeNone to std.range.

* Added unsigned to std.traits.
2011-02-26 15:19:35 -06:00
jmdavis
1a3c750902 Merge branch 'master' of https://github.com/kyllingstad/phobos into kyllingstad-master 2011-02-09 12:08:57 -08:00
Walter Bright
046e1b36db add source links 2011-02-06 15:46:50 -08:00