title: Counting how many times specific character appears in string - Kotlin
body: <p>How one may count how many times specific character appears in string in Kotlin?</p>
  <p>From looking at <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/" rel="nofollow noreferrer">https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/</a> there is nothing built-in and one needs to write loop every time (or may own extension function), but maybe I missed a better way to achieve this?</p>