@@ -731,7 +731,7 @@ public int SmartMatch(string label, string word, int len)
731
731
{
732
732
if ( label . StartsWith ( word , StringComparison . OrdinalIgnoreCase ) )
733
733
{
734
- if ( label . StartsWith ( word ) ) return 1 ;
734
+ if ( label . StartsWithOrdinal ( word ) ) return 1 ;
735
735
else return 5 ;
736
736
}
737
737
return 0 ;
@@ -751,15 +751,15 @@ public int SmartMatch(string label, string word, int len)
751
751
int p2 ;
752
752
if ( firstUpper ) // try case sensitive search
753
753
{
754
- p2 = label . IndexOf ( word ) ;
754
+ p2 = label . IndexOfOrdinal ( word ) ;
755
755
if ( p2 >= 0 )
756
756
{
757
- int p3 = label . LastIndexOf ( "." + word ) ; // in qualified type name
757
+ int p3 = label . LastIndexOfOrdinal ( "." + word ) ; // in qualified type name
758
758
if ( p3 > 0 )
759
759
{
760
760
if ( p3 == label . LastIndexOf ( '.' ) )
761
761
{
762
- if ( label . EndsWith ( "." + word ) ) return 1 ;
762
+ if ( label . EndsWithOrdinal ( "." + word ) ) return 1 ;
763
763
else return 3 ;
764
764
}
765
765
else return 4 ;
@@ -829,7 +829,7 @@ public int IsAbbreviation(string label, string word)
829
829
}
830
830
else
831
831
{
832
- p2 = label . IndexOf ( "." + c ) ;
832
+ p2 = label . IndexOfOrdinal ( "." + c ) ;
833
833
if ( p2 >= 0 ) { score = 2 ; p2 ++ ; }
834
834
else
835
835
{
@@ -844,7 +844,7 @@ public int IsAbbreviation(string label, string word)
844
844
{
845
845
p = p2 ;
846
846
c = word [ i ++ ] ;
847
- if ( char . IsUpper ( c ) ) p2 = label . IndexOf ( c . ToString ( ) , p + 1 ) ;
847
+ if ( char . IsUpper ( c ) ) p2 = label . IndexOfOrdinal ( c . ToString ( ) , p + 1 ) ;
848
848
else p2 = label . IndexOf ( c . ToString ( ) , p + 1 , StringComparison . OrdinalIgnoreCase ) ;
849
849
if ( p2 < 0 ) return 0 ;
850
850
@@ -858,7 +858,7 @@ public int IsAbbreviation(string label, string word)
858
858
}
859
859
if ( dist == len - 1 )
860
860
{
861
- if ( label == word || label . EndsWith ( "." + word ) ) return 1 ;
861
+ if ( label == word || label . EndsWithOrdinal ( "." + word ) ) return 1 ;
862
862
return score ;
863
863
}
864
864
else return score + 2 ;
@@ -895,9 +895,9 @@ public bool ReplaceText(string tail, char trigger)
895
895
{
896
896
if ( word != null && tail . Length > 0 )
897
897
{
898
- if ( replace . StartsWith ( word , StringComparison . OrdinalIgnoreCase ) && replace . IndexOf ( tail ) >= word . Length )
898
+ if ( replace . StartsWith ( word , StringComparison . OrdinalIgnoreCase ) && replace . IndexOfOrdinal ( tail ) >= word . Length )
899
899
{
900
- replace = replace . Substring ( 0 , replace . IndexOf ( tail ) ) ;
900
+ replace = replace . Substring ( 0 , replace . IndexOfOrdinal ( tail ) ) ;
901
901
}
902
902
}
903
903
host . BeginUndoAction ( ) ;
0 commit comments