Scala split camel case source code example

I'm sorry, I don't remember where I found this code, but here's a Scala function to split a camel case string into its components strings (substrings):

  def splitCamelCase(s: String): String = {
   return s.replaceAll(
      " "
   ).replaceAll("  ", " ")

I'll write more about this in a future tutorial, but for now I just wanted to share this code.