I have a Text Field that a user can use to enter their LinkedIn URL. However, I don't want the user to be able to just enter any URL they want so how can I check that the string they entered exactly starts with
https://www.linkedin.com/in/...
You can use String's hasPrefix function:
if textField.text.hasPrefix("https://www.linkedin.com/in") {
print("string starts with https://www.linkedin.com/in")
} else {
print("string does not start with https://www.linkedin.com/in")
}