chore: 首次簽入 Thinkyu ASP.NET 專案
- 加入 Visual Studio / ASP.NET .gitignore - 排除建置輸出、IDE 設定、NuGet packages、大型 MSI 安裝檔
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace 報到系統客戶端
|
||||
{
|
||||
internal class Utils
|
||||
{
|
||||
/// <summary>
|
||||
/// 手機號轉隱碼輸出(前4後3)
|
||||
/// </summary>
|
||||
/// <param name="mobile"></param>
|
||||
/// <returns></returns>
|
||||
public static string HideMobile(string mobile)
|
||||
{
|
||||
if (string.IsNullOrEmpty(mobile))
|
||||
return string.Empty;
|
||||
|
||||
if (mobile.Length >= 7)
|
||||
return mobile.Substring(0, 4) + "***" + mobile.Substring(mobile.Length - 3);
|
||||
|
||||
return "***";
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user