Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static member Compare (a:ByteString, b:ByteString) =
- let x,o,l = a.Array, a.Offset, a.Count
- let x',o',l' = b.Array, b.Offset, b.Count
- if x = x' && o = o' && l = l' then 0
- elif x = x' then
- if o = o' then if l < l' then -1 else 1
- else if o < o' then -1 else 1
- else let left, right = x.[o..(o+l-1)], x'.[o'..(o'+l'-1)] in
- if left = right then 0 elif left < right then -1 else 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement