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

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -