Is this a half-sort? The problem over here introduces an new type of strings: if you split the string into equal halfs and swap the pairs, it produces the same output as sorting the string. We call that a half-sort.

Given a purely ASCII string, check if the string is in a half-sort.

An example of a half-sort string

The string node is a half-sort string, because if you sort by codepoints (note that the codepoints are in decimal, not binary):

n 110
o 111
d 100
e 101


That gets turned into:

d 100
e 101
n 110
o 111


You'll see that the node to deno conversion is exactly moving the right half to the left position.

Specification


For odd-length strings, splitting should make the first half longer.
Sorting a string means sorting the string based on the codepoints of the characters.


Reference program &amp; test cases

Here is the reference program I made for checking my test cases.

node -&gt; True
rum  -&gt; True
aaa  -&gt; True

deno -&gt; False
rim  -&gt; False
J, 20 18 15 14 bytes

-1 thanks to Jonah.

Goes the other way around: sorts the string ('node' -> 'deno'), rotates it back ('deno' -> 'node') and checks if this equals the input. Fits better J trains. 

-:&lt;.@-:@#|./:~


Try it online!

How it works

-:&lt;.@-:@#|./:~
           /:~  sort input
  &lt;.@-:@#       length of input, halved and floored
         |.     rotate sorted input by that amount
-:              input equal to that?