encodeString
string
encodeString は、取り消し可能、照会不可能、および編集不可能です。
このアクションは文字列を取得して、別のコマンドに送る前に回避する必要があるキャラクタをエンコードします。このキャラクタには次のものが含まれます。| string | コマンドの結果 |
// Set the string $s to: print("Hello\n");
string $quote = "\"";
// Result: " //
string $backslash = "\\";
// Result: \ //
string $s = "print(" + $quote + "Hello" + $backslash + "n" + $quote + ");";
// Result: print("Hello\n"); //
string $es = `encodeString $s`;
// Result: print(\"Hello\\n\"); //