```
# NOT RUN {
charmatch("", "") # returns 1
charmatch("m", c("mean", "median", "mode")) # returns 0
charmatch("med", c("mean", "median", "mode")) # returns 2
# }
```

Run the code above in your browser using DataCamp Workspace