Open wFxCA7byemMq90cYsywsiVQEd41l12oZRs3IKpI opened 5 years ago
Hmm... I'm not sure what I'd put that was simple enough.
action comparator(string left, string right) {
if (left > right) { // You can compare strings in Epl
return 1;
} else {
return -1;
}
}
Observable.fromValues(["xyz", "abc"])
.sort(comparator)
....
Is it obvious why this works? Relys on string comparison <
or >
https://github.com/SoftwareAG/apama-rxepl/blob/master/docs/interfaces/IObservable.md#sort
The sort example needs to be extended so show how it would be used when sorting a string or an event element