[]除了用“+"拼接,如何创建格式化字符串?

如其他语言:stirng.format("Today is %s year.", 2017) => Today is 2017 year.
Laya中有类似功能吗?(不要 + ) 
 
已邀请:

Monica - 知识达人

赞同来自:

除了AS,JS和TS都可以做到
以js为例:
// ES6:
var h = 'Hello';
var w = 'World';
var helloWorld = `${h} ${w}`;
console.log(helloWorld);

// 用在console
console.log("%s%d", "one plus one equals ", 2)

要回复问题请先

商务合作
商务合作