復制代碼 代碼如下:
//string strText = "1334677999";實現無重復
public static string qu(string lab)
{
string strResult = string.Empty;
for (int intIdx = 0; intIdx < lab.Length; intIdx++)
{
if (strResult.IndexOf(lab.Substring(intIdx, 1)) < 0)
{
strResult += lab.Substring(intIdx, 1);
}
}
return strResult;
}