I am implementing a library for data representation.
One of the feature support by this package is to compile composite
data (JSON supported) into binary format that can be sorted using
As part of this binary-collation feature I need to support string
sorting based on ICU collation standard. After a bit of googling
came across this awesome package:
And I am using Collator.Key() to compile string into ICU sort-key
that can be used with memcmp.
Wrote couple of test cases for this and it works fine.
My Question is:
After compiling the string value to binary-comparable sort-key, can
I get back the original string value from its sort-key ? Is that a
limitation with ICU standard or a limitation with golang.org/x/text/collate