Advertisement
MiroJoseph

Your order, please

Apr 21st, 2020
444
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scala 0.18 KB | None | 0 0
  1. My:
  2. object Text {
  3.     def order (str:String):String={
  4.      str.split(" ")
  5.     .sortWith(_.replaceAll("[^0-9]+", "")<_.replaceAll("[^0-9]+", ""))
  6.     .toList
  7.     .mkString(" ")
  8.     }
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement