It doesn’t auto-complete but the function still works when typed out completely. However, thats going to be the least of your problems with that section
First your’e going to have the move to using the for _ in 1…<length to get rid of the unnecessary unused var warning.
Then, you’re going to encounter the change of a String no longer being a collection of characters and hence the .count property no longer being available.
The following explains it more fully, but basically, Unicode allows for potentially two characters in the data to represent one character visually (think e with an acute accent), so it makes problems for index access of strings and we need to access the String.characters property and functions to access the count of characters.