📄 stringformat.html
字号:
<DL>
</DL>
</DL>
<HR>
<A NAME="numberFormat"><!-- --></A><H3>
numberFormat</H3>
<PRE>
private static java.text.DecimalFormat <B>numberFormat</B></PRE>
<DL>
<DL>
</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="StringFormat()"><!-- --></A><H3>
StringFormat</H3>
<PRE>
public <B>StringFormat</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="isValidDate(java.lang.String, java.lang.String)"><!-- --></A><H3>
isValidDate</H3>
<PRE>
public static boolean <B>isValidDate</B>(java.lang.String dateString,
java.lang.String dateFormatPattern)</PRE>
<DL>
<DD>Returns true if the specified date string represents a valid
date in the specified format, using the default Locale.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>dateString</CODE> - a String representing a date/time.<DD><CODE>dateFormatPattern</CODE> - a String specifying the format to be used
when parsing the dateString. The pattern is expressed with the
pattern letters defined for the java.text.SimpleDateFormat class.
<DT><B>Returns:</B><DD>true if valid, false otherwise</DL>
</DD>
</DL>
<HR>
<A NAME="isValidInteger(java.lang.String, int, int)"><!-- --></A><H3>
isValidInteger</H3>
<PRE>
public static boolean <B>isValidInteger</B>(java.lang.String numberString,
int min,
int max)</PRE>
<DL>
<DD>Returns true if the specified number string represents a valid
integer in the specified range, using the default Locale.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>numberString</CODE> - a String representing an integer<DD><CODE>min</CODE> - the minimal value in the valid range
<DT><B>Returns:</B><DD>true if valid, false otherwise</DL>
</DD>
</DL>
<HR>
<A NAME="isValidEmailAddr(java.lang.String)"><!-- --></A><H3>
isValidEmailAddr</H3>
<PRE>
public static boolean <B>isValidEmailAddr</B>(java.lang.String mailAddr)</PRE>
<DL>
<DD>Returns true if the string is in the format of a valid SMTP
mail address: only one at-sign, except as the first or last
character, no white-space and at least one dot after the
at-sign, except as the first or last character.
<p>
Note! This rule is not always correct (e.g. on an intranet it may
be okay with just a name) and it does not guarantee a valid Internet
email address but it takes care of the most obvious SMTP mail
address format errors.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>mailAddr</CODE> - a String representing an email address
<DT><B>Returns:</B><DD>true if valid, false otherwise</DL>
</DD>
</DL>
<HR>
<A NAME="isValidString(java.lang.String, java.lang.String[], boolean)"><!-- --></A><H3>
isValidString</H3>
<PRE>
public static boolean <B>isValidString</B>(java.lang.String value,
java.lang.String[] validStrings,
boolean ignoreCase)</PRE>
<DL>
<DD>Returns true if the specified string matches a string in the set
of provided valid strings, ignoring case if specified.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>value</CODE> - the String validate<DD><CODE>validStrings</CODE> - an array of valid Strings<DD><CODE>ignoreCase</CODE> - if true, case is ignored when comparing the value
to the set of validStrings
<DT><B>Returns:</B><DD>true if valid, false otherwise</DL>
</DD>
</DL>
<HR>
<A NAME="isValidString(java.lang.String[], java.lang.String[], boolean)"><!-- --></A><H3>
isValidString</H3>
<PRE>
public static boolean <B>isValidString</B>(java.lang.String[] values,
java.lang.String[] validStrings,
boolean ignoreCase)</PRE>
<DL>
<DD>Returns true if the strings in the specified array all match a string
in the set of provided valid strings, ignoring case if specified.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>values</CODE> - the String[] validate<DD><CODE>validStrings</CODE> - an array of valid Strings<DD><CODE>ignoreCase</CODE> - if true, case is ignored when comparing the value
to the set of validStrings
<DT><B>Returns:</B><DD>true if valid, false otherwise</DL>
</DD>
</DL>
<HR>
<A NAME="toHTMLString(java.lang.String)"><!-- --></A><H3>
toHTMLString</H3>
<PRE>
public static java.lang.String <B>toHTMLString</B>(java.lang.String in)</PRE>
<DL>
<DD>Returns the specified string converted to a format suitable for
HTML. All signle-quote, double-quote, greater-than, less-than and
ampersand characters are replaces with their corresponding HTML
Character Entity code.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>in</CODE> - the String to convert
<DT><B>Returns:</B><DD>the converted String</DL>
</DD>
</DL>
<HR>
<A NAME="toDate(java.lang.String, java.lang.String)"><!-- --></A><H3>
toDate</H3>
<PRE>
public static java.util.Date <B>toDate</B>(java.lang.String dateString,
java.lang.String dateFormatPattern)
throws java.text.ParseException</PRE>
<DL>
<DD>Converts a String to a Date, using the specified pattern.
(see java.text.SimpleDateFormat for pattern description) and
the default Locale.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>dateString</CODE> - the String to convert<DD><CODE>dateFormatPattern</CODE> - the pattern
<DT><B>Returns:</B><DD>the corresponding Date
<DT><B>Throws:</B>
<DD><CODE>ParseException,</CODE> - if the String doesn't match the pattern
<DD><CODE>java.text.ParseException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="toNumber(java.lang.String, java.lang.String)"><!-- --></A><H3>
toNumber</H3>
<PRE>
public static java.lang.Number <B>toNumber</B>(java.lang.String numString,
java.lang.String numFormatPattern)
throws java.text.ParseException</PRE>
<DL>
<DD>Converts a String to a Number, using the specified pattern.
(see java.text.NumberFormat for pattern description) and the
default Locale.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>numString</CODE> - the String to convert<DD><CODE>numFormatPattern</CODE> - the pattern
<DT><B>Returns:</B><DD>the corresponding Number
<DT><B>Throws:</B>
<DD><CODE>ParseException,</CODE> - if the String doesn't match the pattern
<DD><CODE>java.text.ParseException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="replaceInString(java.lang.String, java.lang.String, java.lang.String)"><!-- --></A><H3>
replaceInString</H3>
<PRE>
public static java.lang.String <B>replaceInString</B>(java.lang.String in,
java.lang.String from,
java.lang.String to)</PRE>
<DL>
<DD>Replaces one string with another throughout a source string.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>in</CODE> - the source String<DD><CODE>from</CODE> - the sub String to replace<DD><CODE>to</CODE> - the sub String to replace with
<DT><B>Returns:</B><DD>a new String with all occurences of from replaced by to</DL>
</DD>
</DL>
<HR>
<A NAME="toContextRelativeURI(java.lang.String, java.lang.String)"><!-- --></A><H3>
toContextRelativeURI</H3>
<PRE>
public static java.lang.String <B>toContextRelativeURI</B>(java.lang.String relURI,
java.lang.String currURI)
throws java.lang.IllegalArgumentException</PRE>
<DL>
<DD>Returns a page-relative or context-relative path URI as
a context-relative URI.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>relURI</CODE> - the page or context-relative URI<DD><CODE>currURI</CODE> - the context-relative URI for the current request
<DT><B>Throws:</B>
<DD><CODE>java.lang.IllegalArgumentException</CODE> - if the relURI is invalid</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=3 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> </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="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="../../../../com/ora/jsp/util/CookieUtils.html"><B>PREV CLASS</B></A>
NEXT CLASS</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html" TARGET="_top"><B>FRAMES</B></A>
<A HREF="StringFormat.html" TARGET="_top"><B>NO FRAMES</B></A>
<SCRIPT>
<!--
if(window==top) {
document.writeln('<A HREF="../../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -