mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
16 lines
375 B
Swift
16 lines
375 B
Swift
// RUN: %swift %s -i | FileCheck %s
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
// String Splits
|
|
//===----------------------------------------------------------------------===//
|
|
{
|
|
var (before, after, found) = "foo.bar".splitFirst('.')
|
|
assert(found)
|
|
assert(before == "foo")
|
|
assert(after == "bar")
|
|
}
|
|
|
|
// CHECK: OKAY
|
|
print("OKAY")
|