Is there a way to join strings, each with a specific surrounding string?

后端 未结 3 830
孤街浪徒
孤街浪徒 2021-01-13 13:35

I\'m looking to use guava\'s Joiner to join List into one string, but with surrounding strings around each one in the list. So I want

3条回答
  •  情深已故
    2021-01-13 14:20

    How about

        String str = "your guest " + Joiner.on(" is here, your guest ").join(names) + " is here";
    

提交回复
热议问题