Change the way getting acronym

This commit is contained in:
弘韬 张 2020-12-11 22:20:09 +08:00
parent aaa938191a
commit d64b4b5b0c

View file

@ -47,7 +47,11 @@ namespace Flow.Launcher.Infrastructure
chineseIndexs.Add(i);
}
StringBuilder resultBuilder = new StringBuilder();
resultBuilder.Append(string.Concat(resultList.Where((r, i) => chineseIndexs.Contains(i)).Select(s => s.First())));
foreach (var chineseIndex in chineseIndexs)
{
resultBuilder.Append(resultList[chineseIndex].First());
}
resultBuilder.Append(' ');
int currentChineseIndex = 0;
@ -90,10 +94,5 @@ namespace Flow.Launcher.Infrastructure
return content;
}
}
private string GetFirstPinyinChar(string content)
{
return string.Concat(content.Split(' ').Select(x => x.First()));
}
}
}