scala 拆分字符串翻转
A string is a collection that stores multiple characters, it is an immutable sequence which cannot be changed.
字符串是存储多个字符的集合,它是不可更改的不可更改的序列。
分割字符串 (Splitting a string)
In Scala, using the split() method one can split the string in an array based on the required separator like commas, spaces, line-breaks, symbols or any regular expression.
在Scala中,使用split()方法可以根据所需的分隔符(例如逗号,空格,换行符,符号或任何正则表达式)将字符串拆分为数组。
Syntax:
句法: