Skip to content

Instantly share code, notes, and snippets.

@alvareztech
Created November 16, 2016 05:19
Show Gist options
  • Save alvareztech/9b9cc267d0deccf3519a05a3b38ab4a6 to your computer and use it in GitHub Desktop.
Save alvareztech/9b9cc267d0deccf3519a05a3b38ab4a6 to your computer and use it in GitHub Desktop.
Get string after any character
let name = "CualquierContenido|123"
let symbol = name.characters.index(of: "|")!
let afterSymbol = name.characters.index(after: symbol)
let value = String(name.characters.suffix(from: afterSymbol))
print(value)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment