Commit Graph

84 Commits

Author SHA1 Message Date
practicalswift
797b80765f [gardening] Use the correct base URL (https://swift.org) in references to the Swift website
Remove all references to the old non-TLS enabled base URL (http://swift.org)
2016-11-20 17:36:03 +01:00
Nicholas Maccharoli
3d7f8cc1a0 [stdlib] Reorder increment and element creation to not need (#5062) 2016-10-14 14:05:49 -07:00
Nate Cook
559092bbf2 [stdlib] Revise stdlib documentation comments
- Expand pre-example explanations
- Update documentation for SE-0118
- Removing remaining 'iff' usage
- Revise Array discussion
- Fix formIndex(_:offsetBy) parameter formatting
- Improve index/formIndex(_:offsetBy:(limitedBy:)?) discussion
- Update Quick Look discussions
- Fixes grammar inconsistencies
- Adds parameter / return documentation
- Adds and expands on examples
- Revises AnyObject discussion for new `id` bridging rules
- Revise readLine, print, and assertion functions
- Add missing docs to String index-moving methods
2016-08-05 16:07:46 -05:00
Patrick Pijnappel
daec2dae00 Resolve conflicts with master 2016-05-24 19:21:04 +02:00
Dmitri Gribenko
d591f9cf7a stdlib: remove most uses of @warn_unused_result, which does nothing now
I kept the one on sorted(), because that one requires a less trivial
change.
2016-05-19 18:39:39 -07:00
Patrick Pijnappel
4419614be4 Move post-nil guarantee to separate line for Iterators' next() 2016-05-08 21:36:39 +02:00
Patrick Pijnappel
ab9e74cba3 Resolve conflicts with upstream 2016-05-05 08:55:34 +02:00
Mark Lacey
e03d334b68 Use Builtin.unreachable() in unavailable functions.
Saves a bit of code size in the standard library by eliminating some
static strings and function calls.

rdar://problem/25767016
2016-05-02 21:30:25 -07:00
Manav Gabhawala
7928140f79 [SE-0046] Implements consistent function parameter labels by discarding extraneous parameter names and adding _ where necessary 2016-04-06 20:21:58 -04:00
Patrick Pijnappel
77b4d73560 [stdlib] Replace stray usages of generator by iterator 2016-03-17 06:07:20 +11:00
Patrick Pijnappel
07a8c39fcb [stdlib] Use double space as sentence separator in IteratorType.next() docs. 2016-03-16 22:36:26 +11:00
Patrick Pijnappel
020841d4ba [stdlib] Add post-nil guarantee for IteratorProtocol.next() to always return nil 2016-03-16 22:06:07 +11:00
Daniel Duan
276370b599 [stdlib] apply SE-0040 to stdlib 2016-03-11 16:01:41 -08:00
Dmitri Gribenko
f0633ce5a9 stdlib: Sequence.iterator() => .makeIterator() 2016-02-23 13:52:30 -08:00
Dmitri Gribenko
dd75aed67a Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-02-17 14:40:05 -08:00
Nate Cook
f3c4e0ac74 Remove style on *generator* and friends. 2016-02-12 04:20:01 -06:00
Dmitri Gribenko
c5d694c4af Swift 3 migration: add migration aids for EnumeratedIterator and EnumeratedSequence 2016-01-21 15:25:21 -08:00
Dmitri Gribenko
a34a44f6c2 Swift 3 migration: add migration aids for EnumerateSequence 2016-01-21 11:48:41 -08:00
Max Moiseev
86680ec622 [stdlib] @available attributes for removed APIs 2016-01-20 13:08:27 -08:00
Max Moiseev
f51e708a8f Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-01-04 12:25:25 -08:00
Zach Panzarino
e3a4147ac9 Update copyright date 2015-12-31 23:28:40 +00:00
Max Moiseev
a7339e67ac Merge remote-tracking branch 'origin' into swift-3-api-guidelines 2015-12-22 11:36:07 -08:00
Chris Lattner
66f7ef1295 Move stdlib off ++ and -- 2015-12-21 18:07:36 -08:00
Dmitri Gribenko
06577273e9 var Sequence.enumerated => func 2015-12-18 16:22:24 -08:00
Doug Gregor
a97ab6dd14 Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2015-12-18 10:15:47 -08:00
Patrick Pijnappel
a61839d696 [stdlib] Add ordering guarantee to min() and max() docs 2015-12-18 09:51:34 +11:00
Max Moiseev
3fe0c60d7f Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2015-12-17 11:00:02 -08:00
Patrick Pijnappel
fe478b7633 [stdlib] Add sort stability comment to min()/max() 2015-12-17 14:17:50 +11:00
Patrick Pijnappel
75a6609c61 [stdlib] Unabbreviate local variable names 2015-12-17 14:07:58 +11:00
Patrick Pijnappel
370f4f0de4 [stdlib] Refactor min(_:_:_:_:) 2015-12-17 14:00:03 +11:00
Patrick Pijnappel
220f2d1c89 [stdlib] Refactor min(_:_:) 2015-12-17 13:59:48 +11:00
Arsen Gasparyan
9f728c6dbd [stdlib] Make comparison operator choices consistent 2015-12-16 22:50:36 +03:00
Arsen Gasparyan
ee97757756 Set default value 2015-12-15 23:30:08 +03:00
Max Moiseev
806be29941 Merge remote-tracking branch 'origin' into swift-3-api-guidelines 2015-12-14 12:05:35 -08:00
Patrick Pijnappel
95622c435b [stdlib] Replace .Some(x) and .None by x and nil, respectively 2015-12-13 12:10:43 +11:00
Maxim Moiseev
844b81c46b SequenceType => Sequence 2015-12-09 17:16:56 -08:00
Dmitri Gribenko
d72b5ab575 func SequenceType.enumerate() => var SequenceType.enumerated 2015-12-09 17:13:21 -08:00
Dmitri Gribenko
1c0047829a Rename SequenceType.generate() to SequenceType.iterator() 2015-12-09 17:11:17 -08:00
Dmitri Gribenko
2cf172160c Rename SequenceType.Generator associated type to SequenceType.Iterator 2015-12-09 17:11:05 -08:00
Dmitri Gribenko
31598d41bf Rename GeneratorType to IteratorProtocol 2015-12-07 17:08:32 -08:00
Dmitri Gribenko
3505975a75 Make EnumerateGenerator and EnumerateSequence initializers internal 2015-12-07 16:56:31 -08:00
Dmitri Gribenko
866ce291c3 Fix coding style 2015-12-07 16:56:18 -08:00
Dmitri Gribenko
f230ebeda9 Change EnumerateGenerator.Element's label from 'index' to 'offset' 2015-12-07 16:54:38 -08:00
Max Moiseev
d0e1cb3a0e Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2015-12-07 16:43:20 -08:00
codestergit
6e85e69283 [stdlib] Using map and guard let for nil handling 2015-12-06 04:01:33 +05:30
Johan K. Jensen
fa76656c82 Remove instances of duplicated words 2015-12-03 20:00:29 +01:00
Dmitri Gribenko
174d475833 stdlib: Remove unavavailable APIs that were left as migration aids
These APIs are from the Swift 1.2 => Swift 2.0 transition, and are not
relevant anymore.

Removing them reduces the surface area of the library that needs to be
reviewed.
2015-12-02 01:19:50 -08:00
Dmitri Hrybenko
dd3194a18c stdlib: adopt @warn_unused_result
rdar://20957486

Swift SVN r31048
2015-08-06 14:53:18 +00:00
Dave Abrahams
f59279dc31 [stdlib] Fix a couple of availability message
Swift SVN r31025
2015-08-05 20:02:34 +00:00
David Farler
0d1b03086d Add slicing extensions to SequenceType and CollectionType.
rdar://problem/21663830

Add the following new requirements to SequenceType with default implementations:

- dropFirst(n)
- dropLast(n)
- prefix(n)
- suffix(n)
- split(n)

In addition, provide specialized default implementations of these for CollectionTypes with forward, bidirectional, and random-access Index types where possible.

Add the following new requirements to CollectionType with default implementations:

- prefixThrough(n)
- prefixUpTo(n)
- suffixFrom(n)
- split() // isSeparator closure

Add the following convenience APIs:

- dropFirst() -> calls dropFirst(1)
- dropLast() -> calls dropLast(1)

Add a tentative underscored API:

- split() // takes Equatable separator.

Some APIs have undefined behavior when creating slices where the endpoints go beyond the bounds of the underlying collection. This will be fixed later by trapping creation of slices with invalid indices (rdar://problem/21822657).

Swift SVN r30371
2015-07-18 06:51:22 +00:00