調査アンケート: Blockly のご利用体験についてお聞かせください
アンケートを開始
blockly > ブロック > toString
Block.toString() メソッド
このブロックとすべての子について、人が読める形式のテキスト表現を作成します。
署名:
toString(opt_maxLength?: number, opt_emptyToken?: string): string;
パラメータ
パラメータ |
型 |
説明 |
opt_maxLength |
数値 |
(省略可)文字列をこの長さに切り捨てます。 |
opt_emptyToken |
文字列 |
(省略可)空の入力を示すために使用されるプレースホルダ文字列。指定しない場合は、「?」使用されます。 |
戻り値:
文字列
ブロックのテキスト。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2024-10-16 UTC。
[null,null,["最終更新日 2024-10-16 UTC。"],[[["The `toString()` method generates a human-readable text representation of a block and its children."],["This method accepts optional parameters to limit the string length (`opt_maxLength`) and customize the placeholder for empty inputs (`opt_emptyToken`)."],["The output of the `toString()` method is a string containing the textual representation of the block."]]],[]]