Input from the keyboard in command line application

The Solution to Input from the keyboard in command line application is


The correct way to do this is to use readLine, from the Swift Standard Library.

Example:

let response = readLine()

Will give you an Optional value containing the entered text.

~ Answered on 2015-12-07 21:55:34


Most Viewed Questions: