⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 stringutils.html

📁 turbine教程
💻 HTML
📖 第 1 页 / 共 2 页
字号:
&nbsp;<P><!-- ============ FIELD DETAIL =========== --><A NAME="field_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Field Detail</B></FONT></TD></TR></TABLE><A NAME="PPKEY_CLASSNAME"><!-- --></A><H3>PPKEY_CLASSNAME</H3><PRE>public static final int <B>PPKEY_CLASSNAME</B></PRE><DL></DL><HR><A NAME="PPKEY_ID"><!-- --></A><H3>PPKEY_ID</H3><PRE>public static final int <B>PPKEY_ID</B></PRE><DL></DL><HR><A NAME="PPKEY_PROPERTY"><!-- --></A><H3>PPKEY_PROPERTY</H3><PRE>public static final int <B>PPKEY_PROPERTY</B></PRE><DL></DL><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TD></TR></TABLE><A NAME="StringUtils()"><!-- --></A><H3>StringUtils</H3><PRE>public <B>StringUtils</B>()</PRE><DL></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="makeString(java.lang.String)"><!-- --></A><H3>makeString</H3><PRE>public static final java.lang.String <B>makeString</B>(java.lang.String&nbsp;foo)</PRE><DL><DD>Deal with null strings converting them to "" instead.  It also invokes String.trim() on the output.<DD><DL><DT><B>Parameters:</B><DD><CODE>foo</CODE> - A String.<DT><B>Returns:</B><DD>A String.</DL></DD></DL><HR><A NAME="isValid(java.lang.String)"><!-- --></A><H3>isValid</H3><PRE>public static final boolean <B>isValid</B>(java.lang.String&nbsp;foo)</PRE><DL><DD>Validates that the supplied string is neither <code>null</code> nor the empty string.<DD><DL><DT><B>Parameters:</B><DD><CODE>foo</CODE> - The text to check.<DT><B>Returns:</B><DD>Whether valid.</DL></DD></DL><HR><A NAME="isEmpty(java.lang.String)"><!-- --></A><H3>isEmpty</H3><PRE>public static final boolean <B>isEmpty</B>(java.lang.String&nbsp;foo)</PRE><DL><DD>Determine whether a (trimmed) string is empty<DD><DL><DT><B>Parameters:</B><DD><CODE>foo</CODE> - The text to check.<DT><B>Returns:</B><DD>Whether empty.</DL></DD></DL><HR><A NAME="stackTrace(java.lang.Throwable)"><!-- --></A><H3>stackTrace</H3><PRE>public static final java.lang.String <B>stackTrace</B>(java.lang.Throwable&nbsp;e)</PRE><DL><DD>Returns the output of printStackTrace as a String.<DD><DL><DT><B>Parameters:</B><DD><CODE>e</CODE> - A Throwable.<DT><B>Returns:</B><DD>A String.</DL></DD></DL><HR><A NAME="stackTrace(java.lang.Throwable, boolean)"><!-- --></A><H3>stackTrace</H3><PRE>public static final java.lang.String <B>stackTrace</B>(java.lang.Throwable&nbsp;e,                                                boolean&nbsp;addPre)</PRE><DL><DD>Returns the output of printStackTrace as a String.<DD><DL><DT><B>Parameters:</B><DD><CODE>e</CODE> - A Throwable.<DD><CODE>addPre</CODE> - a boolean to add HTML <pre> tags around the stacktrace<DT><B>Returns:</B><DD>A String.</DL></DD></DL><HR><A NAME="equals(java.lang.String, java.lang.String)"><!-- --></A><H3>equals</H3><PRE>public static boolean <B>equals</B>(java.lang.String&nbsp;s1,                             java.lang.String&nbsp;s2)</PRE><DL><DD>Compares two Strings, returns true if their values are the same.<DD><DL><DT><B>Parameters:</B><DD><CODE>s1</CODE> - The first string.<DD><CODE>s2</CODE> - The second string.<DT><B>Returns:</B><DD>True if the values of both strings are the same.</DL></DD></DL><HR><A NAME="parseObjectKey(java.lang.String)"><!-- --></A><H3>parseObjectKey</H3><PRE>public static java.lang.String[] <B>parseObjectKey</B>(java.lang.String&nbsp;s)</PRE><DL><DD>Takes a String of the form substring[substring]subtring and returns the 3 substrings<DD><DL><DT><B>Returns:</B><DD>a three element String array</DL></DD></DL><HR><A NAME="removeUnderScores(java.lang.String)"><!-- --></A><H3>removeUnderScores</H3><PRE>public static java.lang.String <B>removeUnderScores</B>(java.lang.String&nbsp;data)</PRE><DL><DD>Remove Underscores from a string and replaces first Letters with Capitals.  foo_bar becomes FooBar</DL><HR><A NAME="firstLetterCaps(java.lang.String)"><!-- --></A><H3>firstLetterCaps</H3><PRE>public static java.lang.String <B>firstLetterCaps</B>(java.lang.String&nbsp;data)</PRE><DL><DD>Makes the first letter caps and leaves the rest as is.</DL><HR><A NAME="split(java.lang.String, java.lang.String)"><!-- --></A><H3>split</H3><PRE>public static java.lang.String[] <B>split</B>(java.lang.String&nbsp;text,                                       java.lang.String&nbsp;separator)</PRE><DL><DD>Splits the provided CSV text into a list.<DD><DL><DT><B>Parameters:</B><DD><CODE>text</CODE> - The CSV list of values to split apart.<DD><CODE>separator</CODE> - The separator character.<DT><B>Returns:</B><DD>The list of values.</DL></DD></DL><HR><A NAME="join(java.lang.String[], java.lang.String)"><!-- --></A><H3>join</H3><PRE>public static java.lang.String <B>join</B>(java.lang.String[]&nbsp;list,                                    java.lang.String&nbsp;separator)</PRE><DL><DD>Joins the elements of the provided array into a single string containing a list of CSV elements.<DD><DL><DT><B>Parameters:</B><DD><CODE>list</CODE> - The list of values to join together.<DD><CODE>separator</CODE> - The separator character.<DT><B>Returns:</B><DD>The CSV text.</DL></DD></DL><HR><A NAME="wrapText(java.lang.String, java.lang.String, int)"><!-- --></A><H3>wrapText</H3><PRE>public static java.lang.String <B>wrapText</B>(java.lang.String&nbsp;inString,                                        java.lang.String&nbsp;newline,                                        int&nbsp;wrapColumn)</PRE><DL><DD>Takes a block of text which might have long lines in it and wraps the long lines based on the supplied wrapColumn parameter. It was initially implemented for use by VelocityEmail. If there are tabs in inString, you are going to get results that are a bit strange, since tabs are a single character but are displayed as 4 or 8 spaces. Remove the tabs.<DD><DL><DT><B>Parameters:</B><DD><CODE>inString</CODE> - Text which is in need of word-wrapping.<DD><CODE>newline</CODE> - The characters that define a newline.<DD><CODE>wrapColumn</CODE> - The column to wrap the words at.<DT><B>Returns:</B><DD>The text with all the long lines word-wrapped.</DL></DD></DL><HR><A NAME="wrapLine(java.lang.String, java.lang.String, int)"><!-- --></A><H3>wrapLine</H3><PRE>protected static java.lang.String <B>wrapLine</B>(java.lang.String&nbsp;line,                                           java.lang.String&nbsp;newline,                                           int&nbsp;wrapColumn)</PRE><DL><DD>Wraps a single line of text. Called by wrapText(). I can't think of any good reason for exposing this to the public, since wrapText should always be used AFAIK.<DD><DL><DT><B>Parameters:</B><DD><CODE>line</CODE> - A line which is in need of word-wrapping.<DD><CODE>newline</CODE> - The characters that define a newline.<DD><CODE>wrapColumn</CODE> - The column to wrap the words at.<DT><B>Returns:</B><DD>A line with newlines inserted.</DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">  <TR ALIGN="center" VALIGN="top">  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/StringUtils.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../../../org/apache/turbine/util/StringStackBuffer.html"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../../../org/apache/turbine/util/SystemError.html"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="StringUtils.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: &nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR>Copyright &copy; 2000-2002 Apache Software Foundation. All Rights Reserved.</BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -