このコードで StringBuilder を使用する方法。
string strFunc = "data /*dsdsds */ data1 /*sads dsds*/";
while (strFunc.Contains("/*"))
{
int tempStart = strFunc.IndexOf("/*");
int tempEnd = strFunc.IndexOf("*/", tempStart);
if (tempEnd == -1)
{
tempEnd = strFunc.Length;
}
strFunc = strFunc.Remove(tempStart, tempEnd + 1 - tempStart);
}
ロジックは、コマンドされたデータを文字列から削除することです