string str = "111222333444555666777888999AAABBB";
string strResult = "";
int i = 0;
do
{
strResult += str.Substring(i, 3);
i = i + 3;
if (i != str.Length)
{
strResult += " ";
}
} while (i < str.Length);
Output:
111 222 333 444 555 666 777 888 999 AAA BBB
ประวัติการแก้ไข 2011-11-18 01:52:45
Date :
2011-11-18 01:51:14
By :
pStudio
No. 6
Guest
Code (C#)
do
{
strOut2 += strPro.Substring(i, 3);
i = i + 3;
if (i != strPro.Length)
{
strOut2 += " ";
}
} while (i < strPro.Length);