Topics
Introduction
I have used Swift for windows 1.9 for debugging purpose. But you can use any Swift programming language compiler as per your availability.
import Foundation func checkstring(_ input: String) -> Bool { if input.hasPrefix("test") { return true } else { return false } } print(checkstring("testpqrsab")) print(checkstring("testabpqrsab")) print(checkstring("pqrs")) print(checkstring("abpqrs"))