2015-06-29から1日間の記事一覧
let num = "one,two,three" //["one", "two", "three"] let array = split(num){ $0 == "," } SwiftではcomponentsSeparatedByStringではなく、splitで文字列を分割することができる。またTrailing closure syntaxを使って、isSepalatorを省略することもでき…
let num = "one,two,three" //["one", "two", "three"] let array = split(num){ $0 == "," } SwiftではcomponentsSeparatedByStringではなく、splitで文字列を分割することができる。またTrailing closure syntaxを使って、isSepalatorを省略することもでき…