C#中的String.Format()和的string.join了Java当量() [英] Java equivalents of C# String.Format() and String.Join()

查看:309
本文介绍了C#中的String.Format()和的string.join了Java当量()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道这是一个有点新手的问题,但是否有等同C#的字符串操作在Java中?

I know this is a bit of a newbie question, but are there equivalents to C#'s string operations in Java?

具体来说,我说的是的String.Format 的string.join

Specifically, I'm talking about String.Format and String.Join.

推荐答案

在Java String对象有一个格式方法(如1.5),但没有加入方法。

The Java String object has a format method (as of 1.5), but no join method.

要得到一堆尚未包括你可以使用字符串有用实用方法<一href=\"http://commons.apache.org/proper/commons-lang//apidocs/org/apache/commons/lang3/StringUtils.html\">org.apache.commons.lang.StringUtils.

To get a bunch of useful String utility methods not already included you could use org.apache.commons.lang.StringUtils.

这篇关于C#中的String.Format()和的string.join了Java当量()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆