|
|
|
|
|
by chingjun
4258 days ago
|
|
Swift has named arguments, and it's called "external parameter name". Here's an example taken from Apple's documentation[1]. func join(string s1: String, toString s2: String, withJoiner joiner: String)
-> String {
return s1 + joiner + s2
}
join(string: "hello", toString: "world", withJoiner: ", ")
// returns "hello, world"
[1]: https://developer.apple.com/library/ios/documentation/swift/... |
|