Write a comparer for it as Z < BA == false in normal coding. You would need
to compare lengths first, then compare two of the same length as normal I
imagine.
In addition to the other comments, you might be able to PadLeft the shorter
string with max length of the two strings...
Something like:
Public Class SpecialComparer
Implements IComparer(Of String)
Public Function Compare(ByVal x As String, ByVal y As String) As
Integer Implements IComparer(Of String).Compare
Dim totalWidth As Integer = Math.Max(x.Length, y.Length)
Return String.Compare(x.PadLeft(totalWidth),
y.PadLeft(totalWidth))
End Function
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.