Ask coding questions

← Back to all posts
Will somebody help me with Swift
ArtyEevee

Will somebody help me with Swift? I'm having a problem with it...
I am trying to check if a string is in the user input. It's the first thing I ever made in Swift, and I've looked it up a ton. Please help!

Answered by Coder100 [earned 5 cycles]
View Answer
Voters
rickysong
ArtyEevee
Comments
hotnewtop
Coder100

https://replit.com/@Coder100/BlueSpringgreenProlog-aeulraeohucrlae#main.swift

Try this out ^^

not sure what your error would have been because you never sent a repl!!
A common error is if you don't add the ! after readline, because as you may know, if you just exit the repl while it prompts you, the string wouldn't be a string because there was no input!

ArtyEevee

@Coder100 oops. i will edit

ArtyEevee

@Coder100 o i see! Thanks that helps a lot :D

Coder100

np! mark as correct answer? @ArtyEevee

ArtyEevee

@Coder100 yep! just one step closer to being a professional coder :P