@@ -731,7 +731,7 @@ public int SmartMatch(string label, string word, int len)
731731 {
732732 if ( label . StartsWith ( word , StringComparison . OrdinalIgnoreCase ) )
733733 {
734- if ( label . StartsWith ( word ) ) return 1 ;
734+ if ( label . StartsWithOrdinal ( word ) ) return 1 ;
735735 else return 5 ;
736736 }
737737 return 0 ;
@@ -751,15 +751,15 @@ public int SmartMatch(string label, string word, int len)
751751 int p2 ;
752752 if ( firstUpper ) // try case sensitive search
753753 {
754- p2 = label . IndexOf ( word ) ;
754+ p2 = label . IndexOfOrdinal ( word ) ;
755755 if ( p2 >= 0 )
756756 {
757- int p3 = label . LastIndexOf ( "." + word ) ; // in qualified type name
757+ int p3 = label . LastIndexOfOrdinal ( "." + word ) ; // in qualified type name
758758 if ( p3 > 0 )
759759 {
760760 if ( p3 == label . LastIndexOf ( '.' ) )
761761 {
762- if ( label . EndsWith ( "." + word ) ) return 1 ;
762+ if ( label . EndsWithOrdinal ( "." + word ) ) return 1 ;
763763 else return 3 ;
764764 }
765765 else return 4 ;
@@ -829,7 +829,7 @@ public int IsAbbreviation(string label, string word)
829829 }
830830 else
831831 {
832- p2 = label . IndexOf ( "." + c ) ;
832+ p2 = label . IndexOfOrdinal ( "." + c ) ;
833833 if ( p2 >= 0 ) { score = 2 ; p2 ++ ; }
834834 else
835835 {
@@ -844,7 +844,7 @@ public int IsAbbreviation(string label, string word)
844844 {
845845 p = p2 ;
846846 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 ) ;
848848 else p2 = label . IndexOf ( c . ToString ( ) , p + 1 , StringComparison . OrdinalIgnoreCase ) ;
849849 if ( p2 < 0 ) return 0 ;
850850
@@ -858,7 +858,7 @@ public int IsAbbreviation(string label, string word)
858858 }
859859 if ( dist == len - 1 )
860860 {
861- if ( label == word || label . EndsWith ( "." + word ) ) return 1 ;
861+ if ( label == word || label . EndsWithOrdinal ( "." + word ) ) return 1 ;
862862 return score ;
863863 }
864864 else return score + 2 ;
@@ -895,9 +895,9 @@ public bool ReplaceText(string tail, char trigger)
895895 {
896896 if ( word != null && tail . Length > 0 )
897897 {
898- if ( replace . StartsWith ( word , StringComparison . OrdinalIgnoreCase ) && replace . IndexOf ( tail ) >= word . Length )
898+ if ( replace . StartsWith ( word , StringComparison . OrdinalIgnoreCase ) && replace . IndexOfOrdinal ( tail ) >= word . Length )
899899 {
900- replace = replace . Substring ( 0 , replace . IndexOf ( tail ) ) ;
900+ replace = replace . Substring ( 0 , replace . IndexOfOrdinal ( tail ) ) ;
901901 }
902902 }
903903 host . BeginUndoAction ( ) ;
0 commit comments