All Downloads are FREE. Search and download functionalities are using the official Maven repository.

scala-cask.appPackage.mustache Maven / Gradle / Ivy

The newest version!
{{>licenseInfo}}
package {{packageName}}

def box(str: String): String = {
  val lines = str.linesIterator.toList
  val maxLen = (0 +: lines.map(_.length)).max
  val boxed = lines.map { line =>
    s" | ${line.padTo(maxLen, ' ')} |"
  }
  val bar = " +-" + ("-" * maxLen) + "-+"
  (bar +: boxed :+ bar).mkString("\n")
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy