questions/00147-hard-c-printf-parser/README.ja.md
C 言語にはprintfという関数があり、以下のようにフォーマットして出力してくれます。
printf("The result is %d.", 42);
この課題では、入力値の文字列をパースして%dや%fのようなフォーマットのプレースホルダーを抜き出します。
例えば、もし入力文字列が"The result is %d"であるなら、パースした結果は['dec']というタプルになります。
マッピングは以下となります。
type ControlsMap = {
c: 'char';
s: 'string';
d: 'dec';
o: 'oct';
h: 'hex';
f: 'float';
p: 'pointer';
};
<a href="../../README.ja.md" target="_blank"></a> <a href="https://tsch.js.org/147/answer/ja" target="_blank"></a> <a href="https://tsch.js.org/147/solutions" target="_blank"></a> <!--info-footer-end-->