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

Content added Content deleted
(Scala solution added)
Line 1,161: Line 1,161:


println(runningLength("""gHHH5YY++///\"""))</lang>
println(runningLength("""gHHH5YY++///\"""))</lang>
See it in your [https://scalafiddle.io/sf/c4dp8GT/2 browser (JavaScript) running]
See it in running in your browser by [https://scalafiddle.io/sf/c4dp8GT/2 ScalaFiddle (JavaScript)]
or by [https://scastie.scala-lang.org/mDoBS77YSG2Z7w5xdAPzcw Scastie (JVM)].

=={{header|Sed}}==
=={{header|Sed}}==