Commit Graph

88 Commits

Author SHA1 Message Date
Patrick Pijnappel
7e0945e7ac [stdlib] Use explicit internal in Unicode.swift 2016-03-17 06:23:19 +11:00
Patrick Pijnappel
4d3d7234aa [stdlib] Replace usages of generator with iterator 2016-03-17 05:50:05 +11:00
Patrick Pijnappel
43bca074cd [stdlib] Fix doc comment for UnicodeScalar.encode() 2016-03-14 12:07:09 +11:00
Patrick Pijnappel
549f7e298e [stdlib] Fix incorrect merge 4d05dc69 2016-03-14 09:23:02 +11:00
Patrick Pijnappel
2ec57104ac [stdlib] Format and clarify documentation in Unicode.swift 2016-03-13 20:53:02 +11:00
Patrick Pijnappel
4d05dc69a1 [stdlib] Resolve merge conflict in Unicode.swift 2016-03-13 14:08:23 +11:00
Daniel Duan
276370b599 [stdlib] apply SE-0040 to stdlib 2016-03-11 16:01:41 -08:00
Rintaro Ishizaki
8891eb638b [stdlib] Add @noescape to output parameter of UnicodeCodecType.encode
Conformance:
 - UTF8.encode
 - UTF16.encode
 - UTF32.encode

Related functions:
 - transcode
 - String._encode
 - _StringCore.encode
2016-03-09 22:10:04 -08:00
Max Moiseev
02006f20bc Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-03-09 16:05:03 -08:00
Max Moiseev
1fae0d1325 Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-03-08 12:48:48 -08:00
Rintaro Ishizaki
4f1a4ecd62 [stdlib] Add @noescape to output parameter of UnicodeCodecType.encode
Conformance:
 - UTF8.encode
 - UTF16.encode
 - UTF32.encode

Related functions:
 - transcode
 - String._encode
 - _StringCore.encode
2016-03-08 17:34:15 +09:00
Max Moiseev
7fe6916bf6 Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-03-07 12:10:47 -08:00
Rintaro Ishizaki
1b54593362 [stdlib] Simplify transcode implementation 2016-03-08 02:04:32 +09:00
Ted Kremenek
90ce8daf0b Merge pull request #1552 from hughbe/stdlib-newlines
[gardening] Remove double new lines from stdlib files
2016-03-05 14:40:04 -08:00
Hugh Bellamy
c1b25bb32f [gardening] Remove double new lines from stdlib files 2016-03-05 15:44:54 +00:00
Patrick Pijnappel
636423c4ec [stdlib] Minor refactor for clarity in UTF8.decode() 2016-03-05 11:01:54 +11:00
Patrick Pijnappel
c109bb2a19 [stdlib] Copy warning to docs of all UnicodeCodecTypes 2016-03-05 09:49:44 +11:00
Patrick Pijnappel
500dc9d7bc [stdlib] Fix bitshift operand mask in UTF8.decode() 2016-03-05 09:48:03 +11:00
Patrick Pijnappel
17124c886f [stdlib] Clarify variable name in UTF8
_atEnd was confusing because it did not mean 'at the end of the sequence', because of buffering.
2016-03-04 10:31:36 +11:00
Patrick Pijnappel
f5d7bd266c [stdlib] Improve comments in UTF8 2016-03-04 10:27:56 +11:00
Patrick Pijnappel
25b5028a6c [stdlib] Improve UTF8._decodeOne() doc comment
Based on the API Design Guidelines.
2016-03-04 09:53:38 +11:00
Max Moiseev
cf4bafe9e3 Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-03-03 13:22:03 -08:00
Patrick Pijnappel
49741cfdd9 [stdlib] Rewrite UTF8 decoding 2016-03-03 23:30:00 +11:00
Max Moiseev
859db53d87 Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-03-01 12:56:26 -08:00
Max Moiseev
e48f452a2e Merge remote-tracking branch 'origin/swift-3-api-guidelines' into swift-3-api-guidelines 2016-02-29 12:15:33 -08:00
Max Moiseev
a49dab6bf8 Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-02-29 12:08:52 -08:00
Patrick Pijnappel
7c7be3dc00 [stdlib] Add @testable for _isValidUTF8() 2016-02-29 08:09:46 +11:00
Patrick Pijnappel
f783558111 [stdlib] Refactor UTF8._isValidUTF() to be useable throughout stdlib
This is as a replacement for usages of UTF8._numTrailingBytes().
Note that the sanityCheck was redundant at both call sites.
2016-02-28 18:48:41 +11:00
Patrick Pijnappel
04f760d836 [stdlib] Fix comments 2016-02-28 16:12:11 +11:00
Patrick Pijnappel
95ea76717c [stdlib] Rewrite UTF8._isValidUTF8() 2016-02-28 15:38:52 +11:00
Daniel Duan
2bc78b8c09 [stdlib] update for 'inout' adjustment (SE-0031) 2016-02-26 12:02:29 -08:00
Dmitri Gribenko
836e7785f9 stdlib: UTF16.measure() => .transcodedLength() 2016-02-25 15:06:00 -08:00
Dmitri Gribenko
6bb8045a72 stdlib: add better argument labels to transcode() 2016-02-25 14:53:52 -08:00
Dmitri Gribenko
f6b271913b stdlib: replace UnicodeDecodingResult.isEmptyInput with Equatable 2016-02-24 21:01:35 -08:00
Dmitri Gribenko
63ec99b186 stdlib: add argument labels to UTF16._copy() 2016-02-24 19:55:57 -08:00
Dmitri Gribenko
68bf4ae8ce stdlib: apply API guidelines in Unicode.swift 2016-02-24 19:55:57 -08:00
Jordan Rose
f922084180 stdlib: Rename miscellaneous enum cases and static vars. 2016-02-24 17:46:14 -08:00
Max Moiseev
78ba5d5f3f [stdlib] Requires in comments changed to Precondition 2016-02-19 18:57:26 -08:00
Max Moiseev
40b1a0b7e0 [stdlib] all sorts of require renamed back to precondition 2016-02-19 18:21:29 -08:00
Dmitri Gribenko
dd75aed67a Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-02-17 14:40:05 -08:00
Dmitri Gribenko
efaa39ea79 stdlib: add first argument labels and some other changes to conform to API guidelines 2016-02-15 23:47:54 -08:00
Nate Cook
355fa4d064 Mark true as code in documentation comments. 2016-02-12 04:21:57 -06:00
Nate Cook
51251dc133 Convert imperative function summaries to present.
i.e., "Return ..." -> "Returns ..."
2016-02-12 04:20:39 -06:00
Nate Cook
f3c4e0ac74 Remove style on *generator* and friends. 2016-02-12 04:20:01 -06:00
Max Moiseev
61c837209b Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-02-04 16:13:39 -08:00
David Farler
3f635d04c7 Reinstante var bindings in refutable patterns, except function parameters.
This reverts commits: b96e06da44,
                      8f2fbdc93a,
                      93b6962478,
                      64024118f4,
                      a759ca9141,
                      3434f9642b,
                      9f33429891,
                      47c043e8a6.

This commit leaves 'var' on function parameters as a warning to be
merged into Swift 2.2. For Swift 3, this will be an error, to be
converted in a follow-up.
2016-01-29 15:27:08 -08:00
Dmitri Gribenko
9bcd5a1056 Collection.length => .count 2016-01-22 18:41:19 -08:00
Doug Gregor
7d70b704e4 Merge commit '5e11e3f7287427d386636a169c4065c0373931a8' into swift-3-api-guidelines 2016-01-19 23:18:20 -08:00
Dmitri Gribenko
74ce1ca79c Add unavailable declarations for Swift 2.2 -> 3 migration 2016-01-19 14:32:59 -08:00
gregomni
e2dee6b9dd [stdlib] Switch keywords from 'typealias' to 'associatedtype' in stdlib
Fixes deprecation warnings arising from addition of new
‘associatedtype’ keyword in sr-511.
2016-01-14 09:39:15 -08:00