形式 |
---|
概要 |
---|
例 |
---|
{0} |
値をそのまま返す。 | {0} ~ 0:A65 = A65 |
:C |
数値を通貨で返します。 | {0:C} ~ 0:55674.74 = $55,674.74 |
:E |
数値を科学的な表記として返します。 | {0:E} ~ 0:123456789 = 1.234568E+008 |
:F |
固定小数点以下の数値を返します。 | {0:F1} ~ 3.14159 = 3.1 |
:000.000 |
プレースホルダーがゼロの数値を返します。 | {0:0000} ~ 0:12.34 = 0012 |
:##.## |
数値を再実行すると、 # 記号が存在する場合、対応する数字に置き換えられます。それ以外の場合、結果に桁は表示されません。 | {0:####} ~ 0:1234.5678 = 1235 |
:% |
数値に100 を掛け、パーセンテージ記号で | {0:%} ~ 0:0.002 = 0.2% |
:‰ |
数値に1000を掛けたものにマイル単位の記号を付けて返します。 | {0:‰} ~ 0:0.002 = 2‰ |
:d |
日付と時刻の短い日付表現を返します。 | {0:d} ~ 0:4/18/2008 6:30:15 AM = 4/8/2008 |
:D |
日付と時刻の長い日付表現を返します。 | {0:D} ~ 0:4/18/2008 6:30:15 AM = Friday, April 18, 2008 |
:t |
日付と時刻の短時間表示を返します。 | {0:t} ~ 0:4/18/2008 6:30:15 AM = 6:30 AM |
:T |
日付と時刻の長い時間表現を返します。 | {0:T} ~ 0:4/18/2008 6:30:15 AM = 6:30:15 AM |
:F |
日付と時刻の長い日付と時刻の表現を返します。 | {0:F} ~ 0:4/18/2008 6:30:15 AM = Friday, April 18, 2008 6:30:15 AM |
:f |
日付と時刻の長い日付と短い時間の表現を返します。 | {0:f} ~ 0:4/18/2008 6:30:15 AM = Friday, April 18, 2008 6:30 AM |
:G |
日付と時刻の一般的な日付と時刻の表現を返します。 | {0:G} ~ 0:4/18/2008 6:30:15 AM = 4/18/2008 6:30:15 AM |
:g |
日付と時刻の一般的な日付と短時間の表現を返します。 | {0:g} ~ 0:4/18/2008 6:30:15 AM = 4/18/2008 6:30 AM |
:M |
日付と時刻の月と日の表現を返します。 | {0:M} ~ 0:4/18/2008 6:30:15 AM = April 18 |
:Y |
日付と時刻の年と月の表示を返します。 | {0:Y} ~ 0:4/18/2008 6:30:15 AM = April 2008 |
:s |
日付と時刻のソート可能な日付と時刻の表現を返します。 | {0:s} ~ 0:4/18/2008 6:30:15 AM = 2008-04-18T06:30:15 |
:U |
世界共通の日付と時刻の表現を返します。 | {0:U} ~ 0:4/18/2008 6:30:15 AM = Friday, April 18, 2008 10:30:15 AM |
:u |
日付と時刻の世界共通でソート可能な日付と時刻の表現を返します。 | {0:U} ~ 0:4/18/2008 6:30:15 AM = 2008-04-18 06:30:15z |
:dd/MM/yyyy HH-mm-ss |
データおよび時刻の、日、月、年、時、分、秒の表現を返します。これらのコンポーネントは自由に変更できます。 | {0:MM/dd/yyyy} ~ 0:4/18/2008 6:30:15 AM = 04/18/2008 |
:choose |
オプションのリストから値を検索し、出力のリストから対応する値を出力します。 | {0: choose (1|2|3):one|two|three|other} ~ 0:2 = two |
:cond:<choices> |
数値の値によって、選択肢のリストにおける位置が決まります。選択肢の範囲外の値はデフォルトを出力します。 | {0:cond:First|Second|Default} |
:cond:<logic> |
値はさまざまなロジカルな比較に対してテストされ、個別に出力されます。 | {0:cond:<=0?Unborn?|>=55?Senior|>=18?Adult|>12?Teenager|>?Child|Baby} ~ 0:35 = Adult | |
:cond:{} |
値が空かどうかがチェックされます。 | {0:cond: { } | Empty} ~ 0: = Empty |
.ToLower |
テキストを小文字で返す。 | {0.ToLower} ~ 0:Room = room |
.ToUpper |
テキストを大文字で返す。 | {0.ToUpper} ~ 0:Room = ROOM |
:substr |
指定されたテキストのスライスを返します。 | {0:substr (7) } ~ 0:Doctor Rofus = Rofus |