Search snippets
Browse Code Answers
FAQ
Usage docs
Log In
Sign Up
Home
Swift
swift string keep only numbers
Laura
Programming language:
Swift
2021-03-09 09:24:33
0
Q:
swift string keep only numbers
Shatrughna
Code:
Swift
2021-03-01 02:43:09
let result = string.trimmingCharacters(in: CharacterSet(charactersIn: "0123456789.").inverted)
0
Tags
number
string
Related
swift find difference between two arrays
swift negative line spacing
number of characters in a string swift
string interpolation swift 5
find range of string swift
sizetofit not working swift
swift replace all characters except numbers
swift increase int value
how do i get a string from a float swift to 1 decimal swift
swift apply changes after a word in string
swift uitextfield only numbers keyboard lock programmatically
store bool value in nsuserdefaults swift
get day difference between two dates swift
swift move textfield when keyboard appears
swift compare string to button title
New to Communities?
Join the community