Write String to file in Swift

First you define the String object and next call the writeToFile()