December 2000
Intermediate to advanced
574 pages
17h 3m
English
StringFormat
|
Class Name: |
com.ora.jsp.util.StringFormat |
|
Extends: |
None |
|
Implements: |
None |
The StringFormat
class contains a number of static methods
that can be used to validate the format of strings, typically
received as input from a user, and to format values as strings that
can be used in HTML output without causing browser interpretation
problems.
public class StringFormat {
// Methods
public static boolean isValidDate(String dateString,
String dateFormatPattern);
public static boolean isValidEmailAddr(String emailAddrString);
public static boolean isValidInteger(String numberString,
int min, int max);
public static boolean isValidString(String value,
String[] validStrings, boolean ignoreCase);
public static String replaceInString(String in, String from,
String to);
public static java.util.Date toDate(String dateString,
String dateFormatPattern) throws java.text.ParseException;
public static String toHTMLString(String in);
public static Number toNumber(String numString,
String numFormatPattern) throws java.text.ParseException;
}public static boolean isValidDate(String dateString, String dateFormatPattern)
Returns true if the specified date string
represents a valid date in the specified format. The
dateFormatPattern is 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.
public static boolean isValidEmailAddr(String ...Read now
Unlock full access