文字列が与えられたら、すべての左二重引用符を2つのバッククォートに、すべての右二重引用符を2つのシングルクォートに置き換えます。
左引用符は、引用符を開始する引用符を意味します。右引用とは、引用を終了する引用を意味します。引用符はネストできません。文字列内に偶数の二重引用符があると仮定することができます。
例
入力:
"To be or not to be," quoth the Bard, "that
is the question".
The programming contestant replied: "I must disagree.
To `C' or not to `C', that is The Question!"
出力:
``To be or not to be,'' quoth the Bard, ``that
is the question''.
The programming contestant replied: ``I must disagree.
To `C' or not to `C', that is The Question!''