Split a character string based on change of character: Difference between revisions

(Scala solution added)
Line 1,161:
 
println(runningLength("""gHHH5YY++///\"""))</lang>
See it in running in your browser by [https://scalafiddle.io/sf/c4dp8GT/2 browserScalaFiddle (JavaScript) running]
or by [https://scastie.scala-lang.org/mDoBS77YSG2Z7w5xdAPzcw Scastie (JVM)].
 
=={{header|Sed}}==
 
Anonymous user