Files
swift-mirror/test/Interpreter/strings.swift
Dave Abrahams a8bbc4c89b [stdlib] String internal API review changes
I had to XFAIL test/ClangModules/cf.swift, which is failing for reasons
I can't understand.  <rdar://problem/16911496>

Swift SVN r18071
2014-05-14 14:18:52 +00:00

25 lines
770 B
Swift

// RUN: %target-run-simple-swift | FileCheck %s
//===----------------------------------------------------------------------===//
// String Splits
//===----------------------------------------------------------------------===//
if true {
var (before, after, found) = "foo.bar"._splitFirst(".")
assert(found)
assert(before == "foo")
assert(after == "bar")
}
// CHECK: OKAY
println("OKAY")
//===----------------------------------------------------------------------===//
// String uppercase/lowercase
//===----------------------------------------------------------------------===//
if true {
// CHECK-NEXT: {{^}}FOOBAR.WIBBLE{{$}}
println("FooBar.Wibble".uppercaseString)
// CHECK-NEXT: {{^}}foobar.wibble{{$}}
println("FooBar.Wibble".lowercaseString)
}