[英]Creating custom delimiter in stringtemplate
String Template uses <...>
or $...$
as delimiters. 字符串模板使用
<...>
或$...$
作为分隔符。 I need to have a custom delimiter, something like <<...>>
. 我需要一个自定义分隔符,类似
<<...>>
。 Is this possible? 这可能吗?
The code below accepts only character for the start and end delimiters: 下面的代码只接受开始和结束分隔符的字符:
ST st = new ST("<< token >>", '<<', '>>');
正如这个答案所述,不幸的是你只能在字符串模板中使用单个字符分隔符:(
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.