文字列の説明語ベースを削除する方法がありますが、これを行うにはもっと効率的な方法があると思います。
ファットオークローグのiMonster
ようなもので、ファットを取り除きたいです。
private static string[] _adjectives = { "angry",
"big",
"fat",
"happy",
"large",
"nasty",
"fierce",
"thin",
"small",
"tall",
"short" };
private static string RemoveMonsterAdjective(string iMonster)
{
foreach (string adjective in _adjectives)
{
if (iMonster.Contains(adjective))
{
iMonster = iMonster.Replace(adjective, "").Trim();
break;
}
}
return iMonster;
}
うまくいけば、誰かが私を助けることができます。前もって感謝します。