Maybe I'm missing something here, but it seems like sort isn't sorting the array completely.
This is what I tried:
$ kotlinc
Welcome to Kotlin version 1.2.71 (JRE 10.0.2+13-Ubuntu-1ubuntu0.18.04.2)
Type :help for help, :quit for quit
>>> var test: String = "This is a test of the user system."
>>> var testarray2: Array<String> = test.split(" ").toTypedArray()
>>> testarray2.sort()
>>> testarray2.forEach { println("${it} ") }
This
a
is
of
system.
test
the
user
>>>
As you can see, sorting doesn't seem to be sorting the string "This."
I tried installing openjdk-11 and updating all my packages, but I'm still getting this, and I checked that 1.2.71 is the latest Kotlin package.
Am I doing something wrong?
Thank you in advance.