字符串處理:分割,鏈接,填充 Google Guava

鏈接器[Joiner] 用分隔符把字符串序列鏈接起來也可能會趕上沒必要要的麻煩。若是字符串序列中含有null,那鏈接操做會更難。Fluent風格的Joiner讓鏈接字符串更簡單。html 1 Joiner joiner = Joiner.on("; ").skipNulls(); 2 return joiner.join("Harry", null, "Ron", "Hermione"); 上述代
相關文章
相關標籤/搜索