我正在尝试将字符串模板与自定义分隔符一起使用。
此代码片段:
new ST("Hello @what@", '@', '@').add("what", "world").render()
throws org.stringtemplate.v4.compiler.STException,所以我显然做错了。
如果我将其更改为new ST("Hello $what$", '$', '$'),它可以工作。为什么@不工作?
编辑-我尝试了除$and之外的其他字符@,但$到目前为止什么都没有。这是怎么回事?