Top Tweets for #CharacterSet
I am out of ammunition if you dont want to use toolbar or custom keyboards i only could think of this
accept only digits + locale decimal separator and programmatically allow a leading “-”:
.onChange(of: amount) { newValue in
let sep = Locale.current.decimalSeparator ?? "."
let allowed = CharacterSet(charactersIn: "0123456789-\(sep)")
var filtered = newValue.filter { String($0).rangeOfCharacter(from: allowed) != nil }
// enforce single leading "-" and single decimal separator
if let firstMinus = filtered.firstIndex(of: "-") {
filtered.removeAll(where: { $0 == "-" && $0 != filtered[firstMinus] })
if firstMinus != filtered.startIndex { filtered.remove(at: firstMinus) ; filtered.insert("-", at: filtered.startIndex) }
}
let firstSep = filtered.firstIndex(of: Character(sep))
if let i = firstSep {
let after = filtered.index(after: i)
filtered.removeSubrange(filtered.indices.dropFirst(filtered.distance(from: filtered.startIndex, to: after)).filter { filtered[$0] == Character(sep) })
}
if filtered != newValue { amount = String(filtered) }
}
Last Seen Hashtags on Sotwe
omegle ()*******filter:native_video
Seen from Germany
HumanToilet
Seen from Turkey
kadikoytravesti
Seen from Turkey
BMW4LIVE
Seen from Peru
v2用
Unexpected
Seen from Netherlands
cholita(***)** +filter:native_video
正太
Seen from United States
VIDEOCROT
Seen from Indonesia
ukseller
Seen from Switzerland
Most Popular Users

Elon Musk 
@elonmusk
239.3M followers

Barack Obama 
@barackobama
118.5M followers

Cristiano Ronaldo 
@cristiano
114.3M followers

Donald J. Trump 
@realdonaldtrump
111.7M followers

Narendra Modi 
@narendramodi
106.9M followers

Rihanna 
@rihanna
98.6M followers

NASA 
@nasa
92M followers

Justin Bieber 
@justinbieber
91.7M followers

KATY PERRY 
@katyperry
89.9M followers

Taylor Swift 
@taylorswift13
83.9M followers

Lady Gaga 
@ladygaga
75.4M followers

Virat Kohli 
@imvkohli
73.2M followers

Kim Kardashian 
@kimkardashian
70.8M followers

YouTube 
@youtube
68.6M followers

Neymar Jr 
@neymarjr
66.3M followers

Bill Gates 
@billgates
65.1M followers

Selena Gomez 
@selenagomez
63M followers

The Ellen Show
@theellenshow
62.1M followers

CNN 
@cnn
61.6M followers

X 
@x
60.6M followers
