split() Examples

scala> def Split_line(line: String) = {
     |   line.split("\\|\\|")
     | }
Split_line: (line: String)Array[String]

scala>

scala> val splitted = Split_line("This is a line || hi ")
splitted: Array[String] = Array("This is a line ", " hi ")
c111 > a20 > a11


No comments:

Post a Comment