var str = "warangal"
str.append("k")
print(str)
var name = "ts"
var add = str + name
print(add)
print("\n")
//isEmpty
var res = str.isEmpty
    print(res)
    print(str.isEmpty)
    //
if str.isEmpty {
  print("isempty")
}else{
  print("not empty")
}
//
print(str.reversed())
let rest = String(str.reversed())
print(rest)

for char in str{
    print(char)
}
for char in str{
    print(char, terminator: ",")
}

//print(str.count)
for char in str{
    print(char, separator: ",")
}

print("\n")
//upper
var s = str.uppercased()
print(s)
print(str.uppercased())
//lower
var st = str.lowercased()
print(st)
print(str.lowercased())
//print(str.capitalized())



Embed on website

To embed this program on your website, copy the following code and paste it into your website's HTML: