Tue May 04 2021 07:42:52 GMT+0000 (Coordinated Universal Time)
Saved by @GoodRequest.
fun countLetter(string: String, letter: Char): Int { var count = 0 string.forEach { if (it == letter) count++ } return count }
Copy this HTML code:
Preview:
open_in_newInstructions on embedding in Medium
Comments