I have a string variable like below
val str="raid11112233rdfg"
If i wanted to find the count of digits in string variable using scala how to solve this.Ideally it should give output as count of 8.
such as
str.count(_.isDigit)
might just work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With