Commit graph

329 commits

Author SHA1 Message Date
aceawan
e49c7c5060 Add an example for replaceSlice function and split an assert in two lines in the split's example. 2015-04-06 17:56:58 +02:00
aceawan
afb1a3d2df Add some examples to the split function 2015-04-06 11:13:27 +02:00
aceawan
a5621a2271 Add some examples to the replicate function 2015-04-06 11:05:29 +02:00
aceawan
c875216da7 Add an example for the sameTail function. 2015-04-06 10:53:18 +02:00
aceawan
68ad6f1781 Add a use example to sameHead in array.d 2015-04-04 22:18:59 +02:00
Steven Schveighoffer
0489d82a1f Remove unneeded @disable clear now that clear is removed from object.di 2015-04-01 13:21:55 -04:00
Steven Schveighoffer
5615d4212a Remove unit test that checks for the removal of object.clear 2015-03-31 08:38:25 -04:00
Martin Nowak
ef0bceb30e improve diagnostic for assocArray
- turn constraints into static asserts
2015-03-14 15:08:33 +01:00
sinkuu
43e56d57a5 Fix Issue 14230 - std.array.join misses the first element which is empty string 2015-02-28 17:59:16 +09:00
Ulrich Kuettler
6f6c6862d6 Add table headers in ddoc function tables 2015-02-21 19:10:51 +01:00
Walter Bright
877e490de7 fix trusted issues in std.array 2015-02-10 12:09:09 -08:00
H. S. Teoh
9dc4c34379 Split iteration functions into own submodule. 2015-01-20 09:14:06 -08:00
Ulrich Küttler
20008483d6 Update std.array documentation 2015-01-12 10:07:30 +01:00
Andrej Mitrović
88722a83e2 Merge pull request #2842 from quickfur/issue9119_byPair
Implement byPair.
2015-01-08 21:37:19 +01:00
Andrei Alexandrescu
ba100ff803 Merge pull request #2837 from Poita/Issue13877
Fix Issue 13877 - join assumes forward range can be cheaply iterated twice
2015-01-07 16:27:00 -08:00
H. S. Teoh
5d440aaec4 Add Params: to ddocs.
Hide ugly-as-sin internal comment about compiler bug that shouldn't be
in the generated documentation!
2015-01-07 06:32:19 -08:00
H. S. Teoh
a59a301381 Fixups based on feedback. 2015-01-07 06:32:19 -08:00
H. S. Teoh
08f5c1daf2 Implement byPair.
Improve docs a little.
2015-01-07 06:32:19 -08:00
Mike Parker
77585def4f Fix broken link to isForwardRange in split doc. 2015-01-07 11:33:02 +09:00
Peter Alexander
f81de7d9b9 Fix Issue 13877 - join assumes forward range can be cheaply iterated twice
e.g. with `r.map!(someExpensiveFunction).join`, `join` would previously iterate twice: once to compute length, and again to build up the result. The extra iteration to compute length may be disproportionately expensive, so we now only precompute length for built-in arrays, since we know those are cheap to iterate.

The heuristic could be improved over time, although I can't think of anything better right now.

https://issues.dlang.org/show_bug.cgi?id=13877
2015-01-04 10:08:55 +00:00
Andrej Mitrović
95095812ce Merge pull request #2817 from aldacron/split-doc
Ehance ddoc for std.array.split.
2015-01-02 15:31:03 +01:00
Peter Alexander
9f90a63709 Fix Issue 13909 - assocArray with const values
Just a diagnostic issue. The assignment in the loop won't work with non-mutable keys. We now catch in the constraint.

https://issues.dlang.org/show_bug.cgi?id=13909
2015-01-02 09:33:58 +00:00
Mike Parker
42c5a2f036 Change param 'r' to 'range' and LINK2 to FULL_XREF 2015-01-02 01:47:54 +09:00
Mike Parker
11896ee449 Enhance ddoc for std.array.split. 2015-01-02 01:45:21 +09:00
Walter Bright
7ec5433474 improve doc on std.array.join 2014-12-27 11:39:16 -08:00
Rainer Schuetze
7c2f962b10 make nested foreach over TypeTuple bodies into lambdas to avoid huge functions 2014-11-28 17:15:37 +01:00
Ilya Yaroshenko
2c744b54e1 std.range: constraints => primitives
See discussion and voting in #2661
2014-11-23 20:05:20 +03:00
H. S. Teoh
379d9537bc Merge pull request #2747 from 9il/join2
use emplaceRef in join
2014-11-23 08:47:00 -08:00
Ilya Yaroshenko
8b6dccdc69 use emplaceRef in join
And remove old trustedAllocateArray.
uninitializedArray is already trusted.
2014-11-22 12:52:10 +03:00
Ilya Yaroshenko
c8d9afedea clean scope imports
imports of `std.range, std.algorithm, std.array, std.string,
std.format, std.uni` are affected.
2014-11-21 00:08:35 +03:00
H. S. Teoh
eb66cfaa6e Merge pull request #2746 from 9il/join
std.array.join GC optimisation
2014-11-18 11:39:59 -08:00
Ilya Yaroshenko
9f864a6401 std.array.join optimisation
update PR
2014-11-18 22:04:11 +03:00
Robert burner Schadek
2c773f7c4d new std.array.replaceLast
moved string imports into static if

worked in some review

whitespace damn it

style fixes

rebase and style fixup
2014-11-14 23:58:54 +01:00
H. S. Teoh
c9e1a58a8a Merge pull request #2690 from 9il/splitter
deprecate splitter in std.array
2014-11-14 07:18:47 -08:00
H. S. Teoh
abc3fb1dbf Merge pull request #2701 from 9il/ar
std.range.constraints & std.array code/import swap
2014-11-13 21:21:22 -08:00
Ilya Yaroshenko
b407e14e91 deprecate splitter in std.array
use static import

update PR
2014-11-14 08:11:57 +03:00
David Nadlinger
9c4f10b8a4 Merge pull request #2703 from burner/std_array_replaceFirst_utf_fix
std.array.replaceFirst didn't work with variable length strings
2014-11-14 04:07:15 +01:00
Ilya Yaroshenko
12ba522cba std.range.constraints & std.array cleanup
use static import

rm static
2014-11-14 04:52:33 +03:00
Robert burner Schadek
bf1cb2af7b std.array.replaceFirst didn't work with variable length strings
* also added doc unittest

moved import into static ifs
2014-11-14 00:31:05 +01:00
Robert burner Schadek
f245d01eb5 remove SimpleSlice as it is marked don't use since last edit in 2009 2014-11-13 14:12:23 +01:00
Ilya Yaroshenko
3fcf723aa4 std.array: clean imports
assocArray: updated doc header.

add scope import

added global import in std.array

global import std.algorithm : splitter; in std.arra;

update splitter

import typetuple

import std.algorithm

Fix split

import std.algorithm fix
2014-11-12 15:34:30 +03:00
Ilya Yaroshenko
fd82dfe87f update array.d scope import 2014-11-11 23:03:27 +03:00
Ilya Yaroshenko
6670bb0e6b added scope imports 2014-11-11 22:54:54 +03:00
Robert burner Schadek
6dfd2c6e4d some doc updates and some more testing
moved examples to unittests

DmitryOlshansky fix
2014-10-22 21:58:21 +02:00
Daniel Murphy
5fdfc20493 Merge pull request #2539 from quickfur/issue10683
Add unittest for worksforme bug.
2014-09-20 17:14:29 +10:00
H. S. Teoh
8617f9d430 Add unittest for worksforme bug. 2014-09-19 15:52:02 -07:00
Robert burner Schadek
082176b1b3 issue8851
some more

some review fixes

some more

removed a to
2014-09-19 17:21:20 +02:00
Dmitry Olshansky
68833f0b9a Merge pull request #2240 from Safety0ff/fix12890
Fix issue 12890 - index based replace
2014-08-17 21:41:45 +04:00
safety0ff
c4f1c43366 Fix issue 12890 - index based replace 2014-08-15 06:18:57 -04:00
H. S. Teoh
9ede930dbf More concise way to achieve the same thing. 2014-08-13 12:57:30 -07:00