What is the Swift 2 equivalent to the Swift 3 "String contains" function? -
i want ask equivalent in swift 2 of swift 3 string contains
function? because contains
function won't work in xcode 7.
func gettingsongname(){ let folderurl = nsurl(fileurlwithpath: nsbundle.mainbundle().resourcepath!) { let songpath = try nsfilemanager.defaultmanager().contentsofdirectoryaturl(folderurl, includingpropertiesforkeys: nil, options: .skipshiddenfiles) song in songpath { var mysong = song.absolutestring if mysong.contains(".mp3") } }
wiki
Comments
Post a Comment