提交 50b8e41d 编写于 作者: K kohsuke

added another convenience method.


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@5776 71c3de6d-444a-0410-be80-ed276b4c234a
上级 16d9c93a
...@@ -515,6 +515,16 @@ public class Util { ...@@ -515,6 +515,16 @@ public class Util {
return s; return s;
} }
/**
* Convert empty string to null, and trim whitespace.
*
* @since 1.154
*/
public static String fixEmptyAndTrim(String s) {
if(s==null) return null;
return s.trim();
}
/** /**
* Cuts all the leading path portion and get just the file name. * Cuts all the leading path portion and get just the file name.
*/ */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册