mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[stdlib] String API Review: hide "split" and "lines"
Swift SVN r18514
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
// CHECK-NOT: Reallocations exceeded 30
|
||||
func testReallocation() {
|
||||
var x = "The quick brown fox jumped over the lazy dog\n".split(" ")
|
||||
var x = "The quick brown fox jumped over the lazy dog\n"._split(" ")
|
||||
|
||||
var story = "Let me tell you a story:"
|
||||
var laps = 1000
|
||||
@@ -18,7 +18,7 @@ func testReallocation() {
|
||||
|
||||
// To avoid dumping a vast string here, just write the first
|
||||
// part of the story out each time there's a reallocation.
|
||||
var intro = story.split(":")[0]
|
||||
var intro = story._split(":")[0]
|
||||
println("reallocation \(reallocations), with intro \(intro)")
|
||||
|
||||
if reallocations >= 30 {
|
||||
|
||||
Reference in New Issue
Block a user