Created
November 16, 2016 05:19
-
-
Save alvareztech/9b9cc267d0deccf3519a05a3b38ab4a6 to your computer and use it in GitHub Desktop.
Get string after any character
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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