counter
from the DataStructures
package would be an option as well and should be equivalent in performance to the hand-made solution.
using DataStructures
s = "hello"
counter(s)
counter
from the DataStructures
package would be an option as well and should be equivalent in performance to the hand-made solution.
using DataStructures
s = "hello"
counter(s)