F
franzdawg3
I find it hard to believe that there is not a native solution to this
problem built into VB.NET but based on what I've come up with from
MSDN and google if there is one it is not obvious.
I have 2 situations that I need to handle through string comparison.
NOTE: I am interested in comparison NOT SORTING although they seem
hand in hand.
The first situation is already handled and it is that if I have 3
strings "d1", "d2", and "d11", using String.Compare, or
String.CompareOrdinal works fine as it would arrange these as "d1",
"d11", "d2".
My problem occurs with the 2nd situation which with the same 3 strings
should be "d1", "d2", "d11". String.Compare and String.CompareOrdinal
both think that the string "d2" is greater than the string "d11". Is
there anything built into VB.NET that performs right justified
comparisons?
problem built into VB.NET but based on what I've come up with from
MSDN and google if there is one it is not obvious.
I have 2 situations that I need to handle through string comparison.
NOTE: I am interested in comparison NOT SORTING although they seem
hand in hand.
The first situation is already handled and it is that if I have 3
strings "d1", "d2", and "d11", using String.Compare, or
String.CompareOrdinal works fine as it would arrange these as "d1",
"d11", "d2".
My problem occurs with the 2nd situation which with the same 3 strings
should be "d1", "d2", "d11". String.Compare and String.CompareOrdinal
both think that the string "d2" is greater than the string "d11". Is
there anything built into VB.NET that performs right justified
comparisons?