初始化
This commit is contained in:
23
COMMON/StringMac.cs
Normal file
23
COMMON/StringMac.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace COMMON
|
||||
{
|
||||
/// <summary>
|
||||
/// string mac扩展方法
|
||||
/// </summary>
|
||||
public static class StringMac
|
||||
{
|
||||
/// <summary>
|
||||
/// string 扩展 用于统一mac格式
|
||||
/// </summary>
|
||||
/// <param name="that"></param>
|
||||
public static string ToStringMac(this string that)
|
||||
{
|
||||
return that.Trim().ToUpper().Replace("34-D0", "").Replace("-","").ToLower();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user