I am trying to split string with chunks of 16 chars length. So first of all I create string with 64 length
val data = "Some string"
data = String.format("%-64s", data)
Then I split it with regex
val nameArray = data.split(Regex("(?<=\\G.{16})").toPattern())
Here I expext to get 4 chunks with 16 chars, but I got only 2, where first is 16 and second is 48.
Where am I wrong here?
Kotlin 1.2.61, Oracle JDK 1.8.0_181-b13, Windows 10