/*************************************/
var a = "obdoc111"
if a.hasSuffix("112") {
print("yes")
}else
{
print("no")
}
/*************************************/
var a = "obdoc111"
if a.hasPrefix("obd") {
print("yes")
}else
{
print("no")
}
/*************************************/
var welcome = "hello"
welcome.insert("!", atIndex: welcome.endIndex)
print(welcome)
/*************************************/
var a: String = "abc"
print(a.characters.count)
/*************************************/
var a = ""
if a.isEmpty
{
print("a is empty!")
}
a = "ni hao"
var b = " ma"
var c = ""
c = a+b
print(c)
/*************************************/
var a = ""
if a.isEmpty
{
print("a is empty!")
}
a = "ni hao"
for i in a.characters
{
print(i)
}
var x: UInt = UInt.max
print(x&+1)
var (x,y) = (1,2)
y = x
if x==y
{
print(x)
}
let (x,y) = (1,2)
print(x,y)
var a = -1 , b = 1 ,c=3
print (a==b ?b:c)