blockly > utils > parsing > replaceMessageReferences
utils.parsing.replaceMessageReferences() 函式
如果訊息是字串,則取代訊息中的字串表格參照。舉例來說,"%{bky_my_msg}" 和 "%{BKY_MY_MSG}" 都會替換為 Msg['MY_MSG'] 中的值。
Signature:
export declare function replaceMessageReferences(message: string | any): string;
參數
參數 | 類型 | 說明 |
---|---|---|
訊息 | 字串 | 任何 | Message (訊息),可以是包含字串資料表參照的字串。 |
傳回:
字串
已取代訊息參照的字串。