Files
swift-mirror/test/Interpreter/strings.swift
2012-05-24 21:53:45 +00:00

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")