Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- object ExesAndOhs {
- def xo(str: String): Boolean = {
- if (str.indexOf("o") == (-1) && str.indexOf("x") == (-1)) true
- else if (str.toLowerCase().count(_ == 'o') == str.toLowerCase().count(_ == 'x')) true else false }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement