Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for i in lyricalworld{
- let firstCharacter = lyricalworld[lyricalworld.startIndex]
- let str = String(firstCharacter)
- if vowelArray.contains(str){
- lyricalworld.remove(at: lyricalworld.startIndex)
- }
- }
- func removeFirstLetter(word: String) -> String{
- var lyricalworld = word
- let vowelArray = ["a", "e", "i", "o", "u", "y"]
- for i in lyricalworld{
- let firstCharacter = lyricalworld[lyricalworld.startIndex]
- let str = String(firstCharacter)
- if vowelArray.contains(str){
- lyricalworld.remove(at: lyricalworld.startIndex)
- }
- }
- return lyricalworld
- }
Add Comment
Please, Sign In to add comment