移動先: 概要 戻り値 MEL 例.

概要

encodeString string

encodeString は 「元に戻す」が可能、「照会」が不可能「編集」が不可能 です。

このアクションは文字列を取得して、別のコマンドに送る前に回避する必要があるキャラクタをエンコードします。このキャラクタには次のものが含まれます。

戻り値

string

MEL 例

// 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\"); //