Commit Graph

31 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
Dmitri Gribenko
cfea1a3f58 Merge remote-tracking branch 'origin/master' into swift-3-indexing-model 2016-04-14 17:00:46 -07:00
Dmitri Gribenko
10697f939f Merge commit '510f29abf77e202780c11d5f6c7449313c819030' into swift-3-indexing-model 2016-04-14 13:45:27 -07:00
practicalswift
c760f6dfbf [gardening] Add whitespace: "foo,bar" → "foo, bar" 2016-04-12 22:31:46 +02: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
Dave Abrahams
88a9f2e628 [stdlib] indexing model: Complete Interval/Range merge
Down to 22 failures; only 5 in stdlib tests
2016-03-18 10:04:09 -07:00
Hugh Bellamy
c1b25bb32f [gardening] Remove double new lines from stdlib files 2016-03-05 15:44:54 +00:00
practicalswift
21c3d93bea Remove unused imports. 2016-01-09 01:39:22 +01:00
Zach Panzarino
e3a4147ac9 Update copyright date 2015-12-31 23:28:40 +00:00
Patrick Pijnappel
f181a6eca3 [stdlib] Remove return comments 2015-12-26 11:18:22 +11:00
Patrick Pijnappel
4c894b97a0 [stdlib] Fix comment
Amendment to my own commit.
2015-12-26 11:13:54 +11:00
Patrick Pijnappel
17a5845640 [stdlib] Add terminating period to comments 2015-12-21 13:31:34 +11:00
Patrick Pijnappel
4faa43aa88 [stdlib] Adjust formatting to fit 80 colums 2015-12-21 13:23:12 +11:00
Patrick Pijnappel
58bc25bed6 [stdlib] Add comment 2015-12-17 10:15:45 +11:00
Patrick Pijnappel
8d1261ed22 [stdlib] Fix Int(_:radix:) accepting unintentional cases (SR-187) 2015-12-17 10:12:36 +11:00
Patrick Pijnappel
0998e38ef4 [stdlib] Fix internal doc comment 2015-12-17 09:57:53 +11:00
Patrick Pijnappel
6838f300b1 [stdlib] Add missing backticks around nil in docs 2015-12-13 09:40:49 +11:00
Patrick Pijnappel
a3d5af5cd3 Fix documentation
The parsing regex listed in String(_, radix:) is incorrect.
2015-12-09 11:24:39 +11:00
Maxim Moiseev
0ea9c29acd Remove unnecessary unsafeUnwrap calls.
Since `dropFirst` does not return an `Optional`,
`unsafeUnwrap(xs.dropFirst())` first implicitly wraps result of
`dropFirst` into an optional and then calls `unsafeUnwrap` on that.
2015-11-10 11:03:38 -08: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
Dmitri Hrybenko
53f3ccf850 stdlib: change CollectionType.count() into a property
Swift SVN r28829
2015-05-20 09:14:43 +00:00
Dave Abrahams
5c55682d8b [stdlib] Capitalize keywords in doc comments
Again, the text is a lot more readable that way.

Swift SVN r28472
2015-05-12 16:59:13 +00:00
Dave Abrahams
106b39a497 [stdlib] Indent bullet continuations in doc comments
The text is a lot more readable that way.

Swift SVN r28471
2015-05-12 16:59:08 +00:00
Dmitri Hrybenko
7776ba5a71 stdlib: clean up capitalization in doc comments
Patch by Brian Lanier and Alex Martini.

Swift SVN r28335
2015-05-08 23:44:05 +00:00
Dmitri Hrybenko
c109ec9125 stdlib: protocol extensions: de-underscore count()
Swift SVN r28246
2015-05-07 00:30:38 +00:00
Dmitri Hrybenko
d790954154 stdlib: protocol extensions: de-underscore first
Swift SVN r28242
2015-05-07 00:30:30 +00:00
Dmitri Hrybenko
e96ade89a9 stdlib: protocol extensions: de-underscore isEmpty
Swift SVN r28241
2015-05-07 00:30:29 +00:00
Chris Lattner
31c01eab73 Change the meaning of "if let x = foo()" back to Xcode 6.4 semantics. The compiler
includes a number of QoI things to help people write the correct code.  I will commit
the testcase for it as the next patch.

The bulk of this patch is moving the stdlib, testsuite and validation testsuite to
the new syntax.  I moved a few uses of "as" patterns back to as? expressions in the 
stdlib as well.



Swift SVN r27959
2015-04-30 04:38:13 +00:00
David Farler
9e28dc777a Update standard library doc comments to Markdown
rdar://problem/20180478

Swift SVN r27726
2015-04-26 00:07:11 +00:00
Doug Gregor
793b3326af Implement the new rules for argument label defaults.
The rule changes are as follows:
  * All functions (introduced with the 'func' keyword) have argument
  labels for arguments beyond the first, by default. Methods are no
  longer special in this regard.
  * The presence of a default argument no longer implies an argument
  label.

The actual changes to the parser and printer are fairly simple; the
rest of the noise is updating the standard library, overlays, tests,
etc.

With the standard library, this change is intended to be API neutral:
I've added/removed #'s and _'s as appropriate to keep the user
interface the same. If we want to separately consider using argument
labels for more free functions now that the defaults in the language
have shifted, we can tackle that separately.

Fixes rdar://problem/17218256.

Swift SVN r27704
2015-04-24 19:03:30 +00:00
Dmitri Hrybenko
9c03811987 stdlib: add initializers from String to integer and floating-point types
rdar://17232531

Swift SVN r27159
2015-04-09 03:20:41 +00:00