How do you access command line arguments in Swift?

前端 未结 6 1741
野趣味
野趣味 2020-12-04 07:02

How do you access command line arguments for a command line application in Swift?

6条回答
  •  执笔经年
    2020-12-04 07:23

    In Swift 3 use CommandLine enum instead of Process

    So:

    let arguments = CommandLine.arguments
    

提交回复
热议问题