Consider the following statement:
var str1 = "This is a Swift string" print(str1.uppercaseString)/* w w w . j ava 2s.c o m*/ print(str1.lowercaseString) print(str1.capitalizedString)
Based on type inference, str1 would be of String type.