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"替換,{
相關文章
相關標籤/搜索