mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
17 lines
343 B
Swift
17 lines
343 B
Swift
// RUN: %target-run-simple-swift | FileCheck %s
|
|
// REQUIRES: executable_test
|
|
|
|
func test(s: String)
|
|
{
|
|
print(s)
|
|
var s2 = s[s.startIndex.advanced(by: 2)..<s.startIndex.advanced(by: 4)]
|
|
print(s2)
|
|
var s3 = s2[s2.startIndex..<s2.startIndex]
|
|
var s4 = s3[s2.startIndex..<s2.startIndex]
|
|
}
|
|
|
|
test("some text")
|
|
|
|
// CHECK: some text
|
|
// CHECK: me
|