MessageFormat.format 包含单引号的

MessageFormat.format("region = '{0}'", "en");
实际结果是region = {0}
如果需要被替换的话,需要用双单引号
MessageFormat.format("region = ''{0}''", "en");

猜你喜欢

转载自www.cnblogs.com/huhuuu/p/10346653.html