| | |
| | | using Microsoft.CodeAnalysis.CSharp.Syntax; |
| | | |
| | | namespace HStation.WinFrmUI |
| | | namespace HStation.WinFrmUI |
| | | { |
| | | public class AssetsMatchingHelper |
| | | { |
| | |
| | | int commonCount = baseChars.Intersect(comparisonChars).Count(); |
| | | return commonCount; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取两个字符串的所有交集 |
| | | /// </summary> |
| | | /// <param name="str1"></param> |
| | | /// <param name="str2"></param> |
| | | /// <returns></returns> |
| | | public static string GetIntersect(string str1, string str2) |
| | | { |
| | | if (str1 == null || str2 == null) return null; |
| | | |
| | | return string.Join("", str1.Intersect(str2)); |
| | | } |
| | | |
| | | } |
| | | } |