Michael Ilseman
10e9e336fe
[stdlib] Fix bug in Substring's _persistentContent
...
Substring's _persistentContent has a fast path that avoids a copy when
the Substring represents the entire outer String. It correctly
detected situations where the wrapped _StringCore was not itself a
slice, but was omitting the extra checks to make sure the Substring's
own range covered the entire String.
Test added.
2017-07-25 14:28:57 -07:00
Ben Cohen
ddea636951
[stdlib] Have Substring.filter return a String ( #10871 )
...
* Have Substring.filter return a String
* fix spacing nits
new machine so editor misconfigured excuses excuses
* fix spacing nits
2017-07-24 15:23:30 -07:00
Dave Abrahams
9159239995
Un-revert "[stdlib] String index interchange, etc." ( #10812 )
...
I failed to merge the upstream changes to swift-corelibs-foundation at the same
time as I merged that #9806 , and it broke on linux. Going to get it right this
time.
2017-07-07 12:13:25 -07:00
Xi Ge
d9fb110674
Revert "[stdlib] String index interchange, etc." ( #10812 )
...
rdar://33186295
2017-07-07 12:03:16 -07:00
Dave Abrahams
e523c80339
[stdlib] Index interchange, part I
2017-07-07 00:59:04 -07:00
Michael Ilseman
a3e892fca5
[stdlib] Relax ephemeralString sanity check
...
Creating an ephemeral string from a non-contiguous substring does not
reuse the same storage. Relax a sanity check assuming that it did.
2017-06-28 15:48:17 -07:00
Nate Cook
825e9d077d
[stdlib] More documentation revisions / consistency fixes.
2017-06-13 14:08:00 -05:00
Ben Cohen
d0c0043f93
[stdlib] Use ephemeral string for substring comparison ( #10009 )
...
* Use _ephemeralString for substring comparison
Add back != for String/Substring comparison
* OK fine, Linux, if you're going to be difficult
* Different forms of comparison, tests
2017-06-03 11:20:01 -07:00
Dave Abrahams
b2e4bd5d09
[stdlib] Replace _HeapBuffer with a thin wrapper
...
...over ManagedBufferPointer
2017-06-01 04:40:52 -07:00
Dave Abrahams
807410b99e
[stdlib] Make String("...") non-failable in Swift 4
2017-05-24 16:11:34 -07:00
Dave Abrahams
d6fee05375
[stdlib] Enable interchange among StringProtocol models
2017-05-17 17:21:43 -07:00
Maxim Moiseev
8876655f6b
[stdlib] Reverting the String.init?(_: String) behavior ( #9659 )
2017-05-17 13:56:15 -07:00
Nate Cook
817a1efa3b
[stdlib] Documentation revisions
...
- remove additional 'characters' references from String docs
- improved language around escaping pointer arguments
- key path type abstracts
- codable type abstract revisions
- a few more NSString API fixes
2017-05-17 11:58:08 -05:00
practicalswift
aae419ad30
[gardening] Fix word processing artefacts
2017-05-15 11:30:25 +02:00
Nate Cook
f650e0a7da
[stdlib] String and range expressions
...
* finish string documentation revisions
* revise examples throughout to use range expressions instead of e.g.
prefix(upTo: _)
2017-05-13 10:06:12 -05:00
Dave Abrahams
41c244a065
[stdlib] Unicode[Encoding|Parser] => Unicode.[Encoding|Parser]
2017-05-11 17:21:39 -07:00
Dave Abrahams
c64534a873
[stdlib] API adjustments in preparation for proposal update
2017-05-09 11:19:24 -07:00
Dave Abrahams
fd8cfea3ac
[stdlib] String initialization with encoding and CString interop
2017-05-08 19:50:38 -07:00
swift-ci
4b69240301
Merge pull request #9372 from airspeedswift/drop-nuffing
2017-05-06 14:11:13 -07:00
ben-cohen
02562c3eb0
Substring.index(_:offsetBy:) is allowed offset of 0
2017-05-06 13:34:27 -07:00
Max Moiseev
bfb1824f44
[stdlib] Adding the StringProtocol
2017-05-01 16:41:26 -07:00
Ben Cohen
38903764df
Revert "Revert "[stdlib] One-sided ranges and RangeExpression ( #8710 )""
2017-04-30 16:47:23 -07:00
Arnold Schwaighofer
7d5d63eaf8
Revert "[stdlib] One-sided ranges and RangeExpression ( #8710 )"
...
This reverts commit 946b776e37 .
2017-04-30 15:51:16 -07:00
Mark Lacey
bcdf09d166
[stdlib] Disambiguate a subscript operation.
...
This is only flagged by some type checker changes that I have, but it
appears to be a legitimate ambiguity.
2017-04-29 17:15:02 -07:00
Ben Cohen
946b776e37
[stdlib] One-sided ranges and RangeExpression ( #8710 )
...
* One-sided ranges and RangeExpression
* Remove redundant ClosedRange methods from String
* Fix up brittle tests
* Account for Substring update
* XFAIL range diagnostics on Linux
2017-04-28 12:59:04 -07:00
Max Moiseev
f741caf04e
hasSuffix and hasPrefix are not available on Linux
2017-04-26 16:15:20 -06:00
Max Moiseev
e1f502f6cd
Swift 3 compatible String and Substring range subscripts
2017-04-26 12:13:43 -07:00
Max Moiseev
8e55b1dd8a
Adding ExpressibleBy protocol conformances to Substring
2017-04-25 15:03:26 -07:00
Max Moiseev
79f4c9c80e
Making one of Substring initializers public
2017-04-25 15:02:02 -07:00
Max Moiseev
7e8f8681bf
Unavailable String returning subscripts
2017-04-25 15:00:15 -07:00
Max Moiseev
2216a6360e
CustomDebugStringConvertible and var characters
2017-04-25 14:59:20 -07:00
Max Moiseev
161ef05de7
Adding TextOutputStream and TextOutputStreamable conformances
2017-04-25 14:58:51 -07:00
Max Moiseev
f19b9db421
Reimplementing Substring using the RangeReplaceableBidirectionalSlice
2017-04-25 14:58:25 -07:00
Max Moiseev
b1898ab768
Porting String APIs to Subtring and fixing some tests
2017-04-25 14:58:06 -07:00