string count substring in swift 3

preview_player
ะŸะพะบะฐะทะฐั‚ัŒ ะพะฟะธัะฐะฝะธะต
Program to count the number of times that a word appears inside a string in Swift.

๐——๐—ผ๐—ป'๐˜ ๐—ณ๐—ผ๐—ฟ๐—ด๐—ฒ๐˜ ๐˜๐—ผ ๐˜€๐˜‚๐—ฏ๐˜€๐—ฐ๐—ฟ๐—ถ๐—ฏ๐—ฒ ๐—ฎ๐—ป๐—ฑ ๐˜€๐—บ๐—ฎ๐˜€๐—ต ๐˜๐—ต๐—ฒ ๐—ฏ๐—ฒ๐—น๐—น ๐—ฏ๐˜‚๐˜๐˜๐—ผ๐—ป!

(!) ATTENTION: Since at the time that I made this code...
The final version of Swift 3 was NOT released yet...
you may experience some minor errors in the syntax when testing this code!!!

Try Swift online:

Like and share. It's FREE too :)

Download source code at:

Follow us on Facebook

Play Lists

Swift

All

JavaScript

c#

Java

Amazon Lumberyard Game Engine
ะ ะตะบะพะผะตะฝะดะฐั†ะธะธ ะฟะพ ั‚ะตะผะต
ะšะพะผะผะตะฝั‚ะฐั€ะธะธ
ะะฒั‚ะพั€

Hello, I was wondering what would this be when it's on Swift 4, because this function does not exist anymore :(

var wordIndex = 0
var wordArray = Array(word.characters)

When I run the code, it gives me this message
'characters' is deprecated: Please use String or Substring directly

Krystal-tl
join shbcf.ru