scala solution
scala []\nobject Solution {\n  def splitMessage(message: String, limit: Int): Array[String] = {\n    LazyList.range(1,6).flatMap { len =>\n      lazy val x0 = L
```scala []\nobject Solution {\n  def splitMessage(message: String, limit: Int): Array[String] = {\n    LazyList.range(1,6).flatMap { len =>\n      lazy val x0 = List.unfold((0, 1)) { case (i, j) => Option.when(i < message.length) {\n        lazy val i1 = ((i + limit - 3 - len - j.toString.length) max i + 1) min message.length\n        ((i, i1), (i1, j + 1))\n      }}\n      Option.when(limit>len*2+3 && (x0.length).toString.length == len)(x0)\n    }.headOption.map{x0 =>\n      x0.zipWithIndex.map{case ((i0,i1),j) => message.substring(i0,i1) + s"<${j+1}/${x0.length}>" }.toArray\n    }.getOrElse(Array())\n  }\n}\n```
['Scala']