![StringFormat](https://celebpanda.com/wp/wp-content/uploads/2021/05/StringFormat.jpg)
フォーマットに従った文字列を返します。
StringFormat
関数書式
string StringFormat(
string format, // 文字列フォーマット
... ... // パラメータ
);
- 引数
引数名 | 初期値 | I/O | 詳細 |
format | - | IN | メソッドフォーマットを含む文字列。 フォーマットルールはPrintFormat関数と同じです。 |
... | - | IN | パラメータ。カンマ区切りで複数設定出来ます。 |
- 戻り値
フォーマット文字列にパラメータを組み込んだ文字列を返します。
- その他
フォーマットルールはPrintFormat関数のコンテンツを参照。
- サンプルソース
#property strict
void OnInit() {
for(int iRow = 1; iRow <= 7; iRow++){
string strSample = StringFormat("フォーマットサンプル%02d,%d",iRow,3);
Print(strSample);
}
}