- 747 名前:デフォルトの名無しさん mailto:sage [2008/03/14(金) 22:34:00 ]
- >>744
ないんだったら作ればいいんだ。 string static_replace(string text,string from,string to){ string result; while(text.length >= from.length){ if(text[0..from.length] == from){ result ~= to; text = text[from.length .. $]; }else{ result ~= text[0]; text = text[1..$]; } } return result ~ text; } あと、const string myfooだとなぜかdmd君は落ちやがったのでstatic付けてみた const static string myfoo = static_replace(foo,"p","v");
|

|