Swift 4.0 函数命名规范
作者:
JaiUnChat | 来源:发表于
2018-07-21 07:35 被阅读11次func remove(at position: Index) -> Element { }
employees.remove(at: x)
func remove(_ member: Element) -> Element? { }
allViews.remove(cancelButton)
func url(forPath path: String) -> URL { }
let url = url(forPath: "local:80/users")
typealias Path = String // Alternative
func url(for path: Path) -> URL { }
let url = url(for: "local:80/users")
func entity(from dictionary: [String: Any]) -> Entity { /* ... */ }
let entity = entity(from: ["id": "1", "name": "John"])
本文标题:Swift 4.0 函数命名规范
本文链接:https://www.haomeiwen.com/subject/wkicmftx.html
网友评论