MessageFormat 格式化字符串(转)

MessageFormat用来格式化一个消息,一般是一个字符串,好比:java String str = "I'm not a {0}, age is {1,number,short}", height is {2,number,#.#};spa   而MessageFormat能够格式化这样的消息,而后将格式化后的字符串插入到模式中的适当位置,好比:orm 将str中的{0}用"pig"替换,{
相关文章
相关标签/搜索