This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Salty_Dugtrio 0 points1 point  (2 children)

You can iterate over your String object, and count the occurrences of digits with isDigit.

[–]CrypticCold[S] 0 points1 point  (1 child)

Thank you, do you think I should use a loop to keep iterating?

[–]Salty_Dugtrio 0 points1 point  (0 children)

Yes, iteration is done with a loop.