File tree Expand file tree Collapse file tree
src/components/BootstrapBlazor.Region/Services Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,12 +13,10 @@ public static string GetFirstLetters(string text)
1313 var ret = new StringBuilder ( ) ;
1414 foreach ( var c in text )
1515 {
16- foreach ( var item in Cache )
16+ foreach ( var item in Cache . Where ( item => item . Value . Contains ( c , StringComparison . InvariantCulture ) ) )
1717 {
18- if ( item . Value . Contains ( c , StringComparison . InvariantCulture ) )
19- {
20- ret . Append ( item . Key . First ( ) ) ;
21- }
18+ ret . Append ( item . Key . First ( ) ) ;
19+ break ;
2220 }
2321 }
2422 return ret . ToString ( ) . ToUpperInvariant ( ) ;
@@ -29,7 +27,7 @@ public static string GetFirstLetters(string text)
2927 { "a" , "阿啊吖嗄腌锕" } ,
3028 { "ai" , "爱埃碍矮挨唉哎哀皑癌蔼艾隘捱嗳嗌嫒瑷暧砹锿霭" } ,
3129 { "an" , "安按暗岸案俺氨胺鞍谙埯揞犴庵桉铵鹌黯" } ,
32- { "ang" , "昂肮盎 " } ,
30+ { "ang" , "昂盎 " } ,
3331 { "ao" , "凹奥敖熬翱袄傲懊澳坳拗嗷岙廒遨媪骜獒聱螯鏊鳌鏖" } ,
3432 { "ba" , "把八吧巴拔霸罢爸坝芭捌扒叭笆疤跋靶耙茇菝岜灞钯粑鲅魃" } ,
3533 { "bai" , "百白败摆柏佰拜稗捭掰" } ,
You can’t perform that action at this time.
0 commit comments