?? textutils.html
字號:
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Method Detail</B></FONT></TH></TR></TABLE><A NAME="getMatcher(java.lang.String, java.lang.CharSequence)"><!-- --></A><H3>getMatcher</H3><PRE>public static java.util.regex.Matcher <B>getMatcher</B>(java.lang.String pattern, java.lang.CharSequence input)</PRE><DL><DD>Get a matcher object for a precompiled regex pattern. This method tries to reuse Matcher objects for efficiency. It can hold for recycling one Matcher per pattern per thread. Matchers retrieved should be returned for reuse via the recycleMatcher() method, but no errors will occur if they are not. This method is a hotspot frequently accessed.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>pattern</CODE> - the string pattern to use<DD><CODE>input</CODE> - the character sequence the matcher should be using<DT><B>Returns:</B><DD>a matcher object loaded with the submitted character sequence</DL></DD></DL><HR><A NAME="recycleMatcher(java.util.regex.Matcher)"><!-- --></A><H3>recycleMatcher</H3><PRE>public static void <B>recycleMatcher</B>(java.util.regex.Matcher m)</PRE><DL><DD><DL></DL></DD></DL><HR><A NAME="replaceAll(java.lang.String, java.lang.CharSequence, java.lang.String)"><!-- --></A><H3>replaceAll</H3><PRE>public static java.lang.String <B>replaceAll</B>(java.lang.String pattern, java.lang.CharSequence input, java.lang.String replacement)</PRE><DL><DD>Utility method using a precompiled pattern instead of using the replaceAll method of the String class. This method will also be reusing Matcher objects.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>pattern</CODE> - precompiled Pattern to match against<DD><CODE>input</CODE> - the character sequence to check<DD><CODE>replacement</CODE> - the String to substitute every match with<DT><B>Returns:</B><DD>the String with all the matches substituted<DT><B>See Also:</B><DD><CODE>Pattern</CODE></DL></DD></DL><HR><A NAME="replaceFirst(java.lang.String, java.lang.CharSequence, java.lang.String)"><!-- --></A><H3>replaceFirst</H3><PRE>public static java.lang.String <B>replaceFirst</B>(java.lang.String pattern, java.lang.CharSequence input, java.lang.String replacement)</PRE><DL><DD>Utility method using a precompiled pattern instead of using the replaceFirst method of the String class. This method will also be reusing Matcher objects.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>pattern</CODE> - precompiled Pattern to match against<DD><CODE>input</CODE> - the character sequence to check<DD><CODE>replacement</CODE> - the String to substitute the first match with<DT><B>Returns:</B><DD>the String with the first match substituted<DT><B>See Also:</B><DD><CODE>Pattern</CODE></DL></DD></DL><HR><A NAME="matches(java.lang.String, java.lang.CharSequence)"><!-- --></A><H3>matches</H3><PRE>public static boolean <B>matches</B>(java.lang.String pattern, java.lang.CharSequence input)</PRE><DL><DD>Utility method using a precompiled pattern instead of using the matches method of the String class. This method will also be reusing Matcher objects.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>pattern</CODE> - precompiled Pattern to match against<DD><CODE>input</CODE> - the character sequence to check<DT><B>Returns:</B><DD>true if character sequence matches<DT><B>See Also:</B><DD><CODE>Pattern</CODE></DL></DD></DL><HR><A NAME="split(java.lang.String, java.lang.CharSequence)"><!-- --></A><H3>split</H3><PRE>public static java.lang.String[] <B>split</B>(java.lang.String pattern, java.lang.CharSequence input)</PRE><DL><DD>Utility method using a precompiled pattern instead of using the split method of the String class.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>pattern</CODE> - precompiled Pattern to split by<DD><CODE>input</CODE> - the character sequence to split<DT><B>Returns:</B><DD>array of Strings split by pattern<DT><B>See Also:</B><DD><CODE>Pattern</CODE></DL></DD></DL><HR><A NAME="getFirstWord(java.lang.String)"><!-- --></A><H3>getFirstWord</H3><PRE>public static java.lang.String <B>getFirstWord</B>(java.lang.String s)</PRE><DL><DD><DL><DT><B>Parameters:</B><DD><CODE>s</CODE> - String to find first word in (Words are delimited by whitespace).<DT><B>Returns:</B><DD>First word in the passed string else null if no word found.</DL></DD></DL><HR><A NAME="escapeForHTMLJavascript(java.lang.String)"><!-- --></A><H3>escapeForHTMLJavascript</H3><PRE>public static java.lang.String <B>escapeForHTMLJavascript</B>(java.lang.String s)</PRE><DL><DD>Escapes a string so that it can be passed as an argument to a javscript in a JSP page. This method takes a string and returns the same string with any single quote escaped by prepending the character with a backslash. Linebreaks are also replaced with '\n'. Also, less-than signs and ampersands are replaced with HTML entities.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>s</CODE> - The string to escape<DT><B>Returns:</B><DD>The same string escaped.</DL></DD></DL><HR><A NAME="escapeForMarkupAttribute(java.lang.String)"><!-- --></A><H3>escapeForMarkupAttribute</H3><PRE>public static java.lang.String <B>escapeForMarkupAttribute</B>(java.lang.String s)</PRE><DL><DD>Escapes a string so that it can be placed inside XML/HTML attribute. Replaces ampersand, less-than, greater-than, single-quote, and double-quote with escaped versions.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>s</CODE> - The string to escape<DT><B>Returns:</B><DD>The same string escaped.</DL></DD></DL><HR><A NAME="escapeForHTML(java.lang.String)"><!-- --></A><H3>escapeForHTML</H3><PRE>public static java.lang.String <B>escapeForHTML</B>(java.lang.String s)</PRE><DL><DD>Minimally escapes a string so that it can be placed inside XML/HTML attribute. Escapes lt and amp.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>s</CODE> - The string to escape<DT><B>Returns:</B><DD>The same string escaped.</DL></DD></DL><HR><A NAME="writeEscapedForHTML(java.lang.String, javax.servlet.jsp.JspWriter)"><!-- --></A><H3>writeEscapedForHTML</H3><PRE>public static void <B>writeEscapedForHTML</B>(java.lang.String s, javax.servlet.jsp.JspWriter out) throws java.io.IOException</PRE><DL><DD>Utility method for writing a (potentially large) String to a JspWriter, escaping it for HTML display, without constructing another large String of the whole content.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>s</CODE> - String to write<DD><CODE>out</CODE> - destination JspWriter<DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE></DL></DD></DL><HR><A NAME="unescapeHtml(java.lang.CharSequence)"><!-- --></A><H3>unescapeHtml</H3><PRE>public static java.lang.CharSequence <B>unescapeHtml</B>(java.lang.CharSequence cs)</PRE><DL><DD>Replaces HTML Entity Encodings.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>cs</CODE> - The CharSequence to remove html codes from<DT><B>Returns:</B><DD>the same CharSequence or an escaped String.</DL></DD></DL><HR><A NAME="exceptionToString(java.lang.String, java.lang.Throwable)"><!-- --></A><H3>exceptionToString</H3><PRE>public static java.lang.String <B>exceptionToString</B>(java.lang.String message, java.lang.Throwable e)</PRE><DL><DD><DL><DT><B>Parameters:</B><DD><CODE>message</CODE> - Message to put at top of the string returned. May be null.<DD><CODE>e</CODE> - Exception to write into a string.<DT><B>Returns:</B><DD>Return formatted string made of passed message and stack trace of passed exception.</DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ======= START OF BOTTOM NAVBAR ====== --><A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/TextUtils.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../org/archive/util/TestUtils.html" title="class in org.archive.util"><B>PREV CLASS</B></A> <A HREF="../../../org/archive/util/TimestampSerialno.html" title="class in org.archive.util"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html?org/archive/util/TextUtils.html" target="_top"><B>FRAMES</B></A> <A HREF="TextUtils.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--></SCRIPT><NOSCRIPT> <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR>Copyright © 2003-2007 Internet Archive. All Rights Reserved.</BODY></HTML>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -