Search snippets
Browse Code Answers
FAQ
Usage docs
Log In
Sign Up
Home
Swift
How do I check if a string contains another string in Swift
Judy Friedkin
Programming language:
Swift
2021-04-01 06:01:09
0
Q:
How do I check if a string contains another string in Swift
travis
Code:
Swift
2021-07-14 18:45:49
let string = "hello Swift" if string.contains("Swift") { print("exists") }
4
Tags
string
check
con
how
another
Related
declare empty string in swift
how to check object is nil in swift
swift check if regex is in string
New to Communities?
Join the community