Online Swift Compiler to run your Swift code online
This is just like an online playground for Swift.
import Foundation
var myText = " \n SwiftSpeedy is amazing \n\n\n\n "
// remove whitespaces and new lines from both sides
var newText = myText.trimmingCharacters(in: .whitespacesAndNewlines)
print(newText)
If your code takes user input, put it here. For multiple inputs, one per line
We realize that an online Swift playground will be so helpful who are willing to learn Swift coding.
Newbies need an easy-to-use IDE for basic Swift programming. So we have developed this online IDE.