引数名 | 初期値 | I/O | 詳細 |
str | - | In/Out | 置換される文字列 |
find | - | In | 置換したいワード(文字列) |
replacement | - | In | 置換するワード(文字列) |
#property strict // strictは絶対に削除しない事 void OnInit() { string tempstr; int replace_num; tempstr = "文字列検索文字列検索"; printf( "置換前の文字列:【%s】 ", tempstr); replace_num = StringReplace( tempstr , "検索" , "置換" ); printf( "置換後の文字列:【%s】, 置換した数:%d, ", tempstr , replace_num); }
置換前の文字列:【文字列検索文字列検索】 置換後の文字列:【文字列置換文字列置換】, 置換した数:2,