Split string type list into Sub list in Scala -


i have create string list follow

list("[msc050,176484]", "[msc050,176486]") 

i try convert list sub list following code. think way achieve task.

input.map(_.substring(5,13)) 

then got list follow

list(50,17648, 50,17648) 

i want list follow

list(50176484, 50176486) 

can 1 on this?

one way remove commas substring.

input.map(_.substring(5,13).replaceall(",","")) // res0: list[string] = list(5017648, 5017648) 

Comments

Popular posts from this blog

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -

python - Error while using APScheduler: 'NoneType' object has no attribute 'now' -