Curl Global Community

Full Version: format内の%を文字として認識させるには
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
初歩的な質問ですが・・・

formatマクロ内の%を文字として認識させるには
どうすればいいですか??
パーセント記号をふたつ重ねます
Code:
{format "%s got 54%% of the vote", "Bill Clinton"}
ありがとうございます!!

ヘルプのformat(マクロ)の説明の中に記述がありました↓↓



フォーマットの指定子としてパーセント記号が使用されるため、fmt にリテラルのパーセント記号を含める場合は、パーセント記号の前にもう 1 つのパーセント記号を指定します。

次に例を示します。

{format "%s got 54%% of the vote", "Bill Clinton"}