Check prefix and suffix

var derrickName = "derrick"

print(derrickName.hasPrefix("der"))
print(derrickName.hasSuffix("ick"))

Capital letter, upper case

var convertedString: String = ""

convertedString = derrickName.uppercased()
print(convertedString)
convertedString = derrickName.lowercased()
print(convertedString)