Java Doc for StringUtil.java in  » J2EE » Expresso » com » jcorporate » expresso » core » misc » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » J2EE » Expresso » com.jcorporate.expresso.core.misc 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.jcorporate.expresso.core.misc.StringUtil

StringUtil
final public class StringUtil (Code)
This is class that consists of static methods, utilities for manipulations of java.lang.Strings.
author:
   Michael Nash, Peter Pilgrim, Henri Yves AMAIZO


Field Summary
final public static  StringELLIPSES
    
final public static  StringEMPTY_STRING
    


Method Summary
final public static  voidassertBoolean(String theString, String theMessage)
     Throws an exception if theString can't be mapped to a boolean value.
final public static  voidassertNotBlank(String theString, String theMessage)
     Make sure a string is not null.
public static  StringcenterPad(String str, int n)
     enclosed the string with padding character.
public static  StringcenterPad(String str, int n, String delim)
    
public static  HashtablecharacterMap()
     Map accent characters with equivalent without accent.
public static  intcompareDecimals(String decim1, String decim2)
    
public static  intcompareIntegers(String int1, String int2)
     Compare 2 integers string.
public static  StringconvertCommaToDot(String str)
    
public static  StringconvertDotToComma(String str)
    
public static  StringcreateWordWrappedString(String input)
     Take an input string S, break the string into parts of N up to 72 characters long which word wrapped with respective to blank space characters and separated with the newline characters.
public static  StringcreateWordWrappedString(String input, int fixedLength, String delimiter)
     Take an input string S, break the string into parts of N up to F characters long which word wrapped with respective to blank space characters and separated with the supplied delimiter D.
protected static  StringgetEntityRef(int ch)
    
public static  StringgetStackTraceAsString(Throwable t)
    
public static  booleanisAlphaNumeric(String s)
     Check if string is alphanumeric or not.

author Henri Yves AMAIZO
Parameters:
  s - String to check.

public static  booleanisAlphaNumeric(String str, String otherChars)
     Check if string is alphanumeric with addons chararcters or not.
public static  booleanisBlankOrNull(String str)
     Check if an input string is an empty string, just contains whitespace characters, or is null.
public static  booleanisDecimal(String s)
     Check if decimal number

author Henri Yves AMAIZO
Parameters:
  s - string to check.

public static  intisEmail(String email)
    
public static  booleanisInteger(String str)
    
public static  booleanisNumber(String str)
    
public static  booleanisSiren(String siren)
     Check French company siren number.
public static  booleanisSiret(String siret)
    
public static  Stringjoin(String[] input)
    
public static  Stringjoin(String[] input, String delimiter)
    
public static  StringleftPad(String str, int n)
    
public static  StringleftPad(String str, int n, String delim)
    
public static  voidmain(String args)
    
final public static  StringnotNull(String theString)
     Make sure a string is not null.
public static  StringnotNull(SerializableString theString)
    
public static  StringnullToEmpty(String s)
    
public static  StringnumberToLetter(int number, boolean upperCaseFlag)
     This method is useful for creating lists that use letters instead of numbers, such as a, b, c, d...instead of 1, 2, 3, 4.
public static  StringomitPackages(Object obj)
    
public static  StringomitPackages(Class theclass)
    
protected static  FastStringBufferprintEscaped(char ch, FastStringBuffer fsb)
     Formats a particular character to something workable in xml Helper to xmlEscape()
Parameters:
  ch - the character to print.
Parameters:
  fsb - The FastStringBuffer to add this to.
public static  Stringrandom(int count)
     Create a random string author Henri Yves AMAIZO
Parameters:
  count - size of string.
public static  Stringrandom(int count, boolean letters, boolean numbers)
     Create a random numeric string where you have control over size, and whether you want letters, numbers, or both.
public static  Stringrandom(int count, int start, int end, boolean letters, boolean numbers)
     Create a random numeric string where you have control over size, and whether you want letters, numbers, as well as ANSI minimum and maximum values of the characters.
public static  Stringrandom(int count, int start, int end, boolean letters, boolean numbers, char[] set)
     Create a random numeric string where you have control over size, and whether you want letters, numbers, as well as ANSI minimum and maximum values of the characters. author Henri Yves AMAIZO
Parameters:
  count - the size of the string
Parameters:
  start - int minimum 'value' of the character
Parameters:
  end - maximum 'value' of the character
Parameters:
  letters - true if you want letters included
Parameters:
  numbers - true if you want numbers included
Parameters:
  set - the set of possible characters that you're willing to letthe string contain.
public static  Stringrandom(int count, String set)
    
public static  Stringrandom(int count, char[] set)
    
public static  StringrandomAlphabetic(int count)
    
public static  StringrandomAlphanumeric(int count)
    
public static  StringrandomAscii(int count)
    
public static  StringrandomNumeric(int count)
    
public static  StringreformatDecimalString(String str)
    
public static  StringremoveAccents(String s)
    
public static  StringrepeatString(String str, int n)
     Repeat str n time to format another string.
public static  Stringreplace(String s, String sub, String with)
     replace substrings within string.
public static  StringreplaceAll(String text, String key, String value)
     Replace all occurences of key by value in text.
public static  StringreplaceString(String text, String str1, String str2)
    
public static  StringreplaceString(String text, String str1, String str2, int max)
     Replace n occurences of str1 in text by str2.
public static  StringreplaceStringOnce(String text, String str1, String str2)
    
public static  StringreverseString(String str)
     Reverse the String.
Parameters:
  str - the String to reverse.
public static  StringrightPad(String str, int n, String delim)
    
public static  StringrightPad(String str, int n)
    
public static  booleanstartsAndEnds(String s, String search)
    
public static  Liststring2List(String s)
    
public static  Liststring2List(String s, String sep)
    
public static  Liststring2List(String s, String sep, int maxSize)
    
public static  Stringsubstring(String str, int lg)
    
public static  Stringsubstring(String str, int start, int end)
    
public static  StringswapCase(String str)
    
final public static  booleantoBoolean(String theString)
    
public static  Stringtruncate(String str, int len)
     truncate a string at the given length if necessary, adding an ellipses at the end if truncation occurred; uses ELLIPSES static String from this class
Parameters:
  str - The string to process
Parameters:
  len - The maximum length to process the string to.
public static  StringunUpperFirstChar(String str)
    
public static  Stringunquote(String s)
    
public static  StringupperFirstChar(String str)
     convert the first character of the string upper case

author Henri Yves AMAIZO
Parameters:
  str - String to make the first character upper.

public static  StringxmlEscape(String s)
     Formats the string to an XML/XHTML escaped character.

Field Detail
ELLIPSES
final public static String ELLIPSES(Code)
HTML code for ellipses (3 dots, like '...' as one character) used for appending to a truncate() line if necessary



EMPTY_STRING
final public static String EMPTY_STRING(Code)





Method Detail
assertBoolean
final public static void assertBoolean(String theString, String theMessage)(Code)
Throws an exception if theString can't be mapped to a boolean value.
Parameters:
  theString - the string to check
Parameters:
  theMessage - the message to have in the IllegalArgumentExceptionif the conditions aren't met.



assertNotBlank
final public static void assertNotBlank(String theString, String theMessage)(Code)
Make sure a string is not null. This is a convenience method, but it is not necessarily recommended if you do a lot of processing for theMessage parameter. It is recommended that you assertNotBlank, catch IllegalArgumentException and then throw an appropriate exception with your message.
Parameters:
  theString - Any string, possibly null
Parameters:
  theMessage - The error message to use if the argument is not null.



centerPad
public static String centerPad(String str, int n)(Code)
enclosed the string with padding character. Space is padding character

author Henri Yves AMAIZO
Parameters:
  str - String str string to center padding
Parameters:
  n - int n size of the new string String Result




centerPad
public static String centerPad(String str, int n, String delim)(Code)
Enclosed the string with padding character

author Henri Yves AMAIZO
Parameters:
  str - String str string to pad with
Parameters:
  n - int n size of the final string
Parameters:
  delim - String delim padding character String result of the center padding




characterMap
public static Hashtable characterMap()(Code)
Map accent characters with equivalent without accent.

author Henri Yves AMAIZO Hashtable Character mapping table.




compareDecimals
public static int compareDecimals(String decim1, String decim2)(Code)
Compare 2 decimals string

author Henri Yves AMAIZO
Parameters:
  decim1 - First string to compare
Parameters:
  decim2 - Second string to compare int return 1 if decim1 > decim2
retourne 0 if decim1 == decim2
return -1 if decim1 < decim2




compareIntegers
public static int compareIntegers(String int1, String int2)(Code)
Compare 2 integers string.

author Henri Yves AMAIZO
Parameters:
  int1 - first string to compare
Parameters:
  int2 - second string to compare int return 1 if decim1 > decim2
return 0 if decim1 == decim2
return -1 if decim1 < decim2




convertCommaToDot
public static String convertCommaToDot(String str)(Code)
Replace all comma by dot

author Henri Yves AMAIZO
Parameters:
  str - String to change String The result of substitution




convertDotToComma
public static String convertDotToComma(String str)(Code)
Replace all dots byt comma

author Henri Yves AMAIZO
Parameters:
  str - string to change String reformatted




createWordWrappedString
public static String createWordWrappedString(String input)(Code)
Take an input string S, break the string into parts of N up to 72 characters long which word wrapped with respective to blank space characters and separated with the newline characters. This static call has parameters set up for electronic mail standards.

Written by Peter Pilgrim Mon Mar 15 23:12:15 GMT 2004


Parameters:
  input - the input string wrapped broken string
See Also:   StringUtil.createWordWrappedString(String input,int fixedLength,String delimiter)



createWordWrappedString
public static String createWordWrappedString(String input, int fixedLength, String delimiter)(Code)
Take an input string S, break the string into parts of N up to F characters long which word wrapped with respective to blank space characters and separated with the supplied delimiter D.

Written by Peter Pilgrim Mon Mar 15 23:12:15 GMT 2004


Parameters:
  input - the input string
Parameters:
  fixedLength - the maximum fixed length
Parameters:
  delimiter - the delimiter wrapped broken string



getEntityRef
protected static String getEntityRef(int ch)(Code)
Helper to xmlEscape()
Parameters:
  ch - the character to escape A modified string representing the tanlation of the characteror null if there is no translation for it.



getStackTraceAsString
public static String getStackTraceAsString(Throwable t)(Code)
A utility method to return an exception stacktrace as a String

Written by Peter Pilgrim Mon Mar 15 23:12:15 GMT 2004




isAlphaNumeric
public static boolean isAlphaNumeric(String s)(Code)
Check if string is alphanumeric or not.

author Henri Yves AMAIZO
Parameters:
  s - String to check. boolean true if alphanumeric, false if not.




isAlphaNumeric
public static boolean isAlphaNumeric(String str, String otherChars)(Code)
Check if string is alphanumeric with addons chararcters or not.

author Henri Yves AMAIZO
Parameters:
  str - string to check
Parameters:
  otherChars - extra characters to check with boolean true if parameter string contains only alpha numerics,
plus addons characters and false if not.




isBlankOrNull
public static boolean isBlankOrNull(String str)(Code)
Check if an input string is an empty string, just contains whitespace characters, or is null. If it is then return true
Parameters:
  str - the input string boolean true if the string is blank or null



isDecimal
public static boolean isDecimal(String s)(Code)
Check if decimal number

author Henri Yves AMAIZO
Parameters:
  s - string to check. boolean true if the value is decimal number false if not




isEmail
public static int isEmail(String email)(Code)
Check if string pass is a vlaid email address

author Henri Yves AMAIZO
Parameters:
  email - string to check int 0 if valid address, 1 more than 2 tokens (".", "@")
and 2 if the second token is not "." .




isInteger
public static boolean isInteger(String str)(Code)
Check if integer string

author Henri Yves AMAIZO
Parameters:
  str - string to check boolean true if all characters is digit




isNumber
public static boolean isNumber(String str)(Code)
Check if number author Henri Yves AMAIZO
Parameters:
  str - to check boolean



isSiren
public static boolean isSiren(String siren)(Code)
Check French company siren number.

author Henri Yves AMAIZO
Parameters:
  siren - the company number boolean true if ok.




isSiret
public static boolean isSiret(String siret)(Code)
Check French company siret number

author Henri Yves AMAIZO
Parameters:
  siret - The siret number boolean true if equivalent to siret number false if not.




join
public static String join(String[] input)(Code)
Concatenate array of string into one string with constant delimiter ", "

Written by Peter Pilgrim Mon Mar 15 23:12:15 GMT 2004


Parameters:
  input - the input array string the joined string



join
public static String join(String[] input, String delimiter)(Code)
Concatenate array of string into one string with delimiter

Written by Peter Pilgrim Mon Mar 15 23:12:15 GMT 2004


Parameters:
  input - the input array string
Parameters:
  delimiter - the delimiter the joined string



leftPad
public static String leftPad(String str, int n)(Code)
Left padding padding character is space

author Henri Yves AMAIZO
Parameters:
  str - String
Parameters:
  n - int size of the new string String




leftPad
public static String leftPad(String str, int n, String delim)(Code)
Left padding

author Henri Yves AMAIZO
Parameters:
  str - String
Parameters:
  n - int size of the new string
Parameters:
  delim - padding character String result




main
public static void main(String args)(Code)



notNull
final public static String notNull(String theString)(Code)
Make sure a string is not null.
Parameters:
  theString - Any string, possibly null An empty string if the original was null, else the original



notNull
public static String notNull(SerializableString theString)(Code)
Same thing but using a serializable string as the parameter instead
Parameters:
  theString - The string to check against null theString or an empty string if it is null



nullToEmpty
public static String nullToEmpty(String s)(Code)
Return empty string if parameter is null

author Henri Yves AMAIZO
Parameters:
  s - the parameter to check String return the parameter if empty or if the string == null




numberToLetter
public static String numberToLetter(int number, boolean upperCaseFlag) throws IllegalArgumentException(Code)
This method is useful for creating lists that use letters instead of numbers, such as a, b, c, d...instead of 1, 2, 3, 4. Valid numbers are from 1 to 26, corresponding to the 26 letters of the alphabet. By default, the letter is returned as a lowercase, but if the boolean upperCaseFlag is true, the letter will be returned as an uppercase. Creation date: (5/11/00 12:52:23 PM) author: Adam Rossi
Parameters:
  number - The number to convert
Parameters:
  upperCaseFlag - True if you want the final data to be uppercase java.lang.String



omitPackages
public static String omitPackages(Object obj)(Code)
utility to get just name of class
Parameters:
  obj - the object of the given class, the name of which will be returned name of class, less any package prefix



omitPackages
public static String omitPackages(Class theclass)(Code)
utility to get just name of class
Parameters:
  theclass - the given class, the name of which will be returned name of class, less any package prefix



printEscaped
protected static FastStringBuffer printEscaped(char ch, FastStringBuffer fsb)(Code)
Formats a particular character to something workable in xml Helper to xmlEscape()
Parameters:
  ch - the character to print.
Parameters:
  fsb - The FastStringBuffer to add this to. a FastStringBuffer that is modified



random
public static String random(int count)(Code)
Create a random string author Henri Yves AMAIZO
Parameters:
  count - size of string. randomly generated string of size count



random
public static String random(int count, boolean letters, boolean numbers)(Code)
Create a random numeric string where you have control over size, and whether you want letters, numbers, or both.

author Henri Yves AMAIZO
Parameters:
  count - the size of the string
Parameters:
  letters - true if you want letters included
Parameters:
  numbers - true if you want numbers included randomly generated string of size count




random
public static String random(int count, int start, int end, boolean letters, boolean numbers)(Code)
Create a random numeric string where you have control over size, and whether you want letters, numbers, as well as ANSI minimum and maximum values of the characters. author Henri Yves AMAIZO
Parameters:
  count - the size of the string
Parameters:
  start - int minimum 'value' of the character
Parameters:
  end - maximum 'value' of the character
Parameters:
  letters - true if you want letters included
Parameters:
  numbers - true if you want numbers included randomly generated string of size count



random
public static String random(int count, int start, int end, boolean letters, boolean numbers, char[] set)(Code)
Create a random numeric string where you have control over size, and whether you want letters, numbers, as well as ANSI minimum and maximum values of the characters. author Henri Yves AMAIZO
Parameters:
  count - the size of the string
Parameters:
  start - int minimum 'value' of the character
Parameters:
  end - maximum 'value' of the character
Parameters:
  letters - true if you want letters included
Parameters:
  numbers - true if you want numbers included
Parameters:
  set - the set of possible characters that you're willing to letthe string contain. may be null if all values are open. randomly generated string of size count



random
public static String random(int count, String set)(Code)
Create a random string author Henri Yves AMAIZO
Parameters:
  count - the size of the string
Parameters:
  set - the set of characters that are allowed randomly generated string of size count



random
public static String random(int count, char[] set)(Code)
Create a random string author Henri Yves AMAIZO
Parameters:
  count - the size of the string
Parameters:
  set - the set of characters that are allowed randomly generated string of size count



randomAlphabetic
public static String randomAlphabetic(int count)(Code)
Create a random character only string author Henri Yves AMAIZO
Parameters:
  count - size of string randomly generated string of size count



randomAlphanumeric
public static String randomAlphanumeric(int count)(Code)
Create a random alpha numeric string author Henri Yves AMAIZO
Parameters:
  count - the size of the string randomly generated string of size count



randomAscii
public static String randomAscii(int count)(Code)
Create a random Ascii String author Henri Yves AMAIZO
Parameters:
  count - the size of the string randomly generated string of size count



randomNumeric
public static String randomNumeric(int count)(Code)
Create a random numeric string author Henri Yves AMAIZO
Parameters:
  count - the size of the final string randomly generated string of size count



reformatDecimalString
public static String reformatDecimalString(String str)(Code)
Reformat string by converting "," by "."

author Henri Yves AMAIZO
Parameters:
  str - string to reformat String return reformatted string.




removeAccents
public static String removeAccents(String s)(Code)
Remove from the parameter the accent characters and return the remain string or null if empty

author Henri Yves AMAIZO
Parameters:
  s - the string to remove the accent characters String




repeatString
public static String repeatString(String str, int n)(Code)
Repeat str n time to format another string.

author Henri Yves AMAIZO
Parameters:
  str - String to repeat
Parameters:
  n - int n repeat String




replace
public static String replace(String s, String sub, String with)(Code)
replace substrings within string.
Parameters:
  s - The string to work with
Parameters:
  sub - The string to substitude the occurances of
Parameters:
  with - The string to replace with A processed java.util.String



replaceAll
public static String replaceAll(String text, String key, String value)(Code)
Replace all occurences of key by value in text.

author Henri Yves AMAIZO
Parameters:
  text - string in
Parameters:
  key - occurence to replace
Parameters:
  value - string to use String with the replace value




replaceString
public static String replaceString(String text, String str1, String str2)(Code)
Substituate all occurence of str1 by str2 in text

author Henri Yves AMAIZO
Parameters:
  text - search and replace in
Parameters:
  str1 - search for
Parameters:
  str2 - replace with String with all values replaced




replaceString
public static String replaceString(String text, String str1, String str2, int max)(Code)
Replace n occurences of str1 in text by str2. if n = -1 all occurrences are replaced

author Henri Yves AMAIZO
Parameters:
  text - search and replace in
Parameters:
  str1 - search for
Parameters:
  str2 - replace with
Parameters:
  max - int values of occrrences to replace String replaced




replaceStringOnce
public static String replaceStringOnce(String text, String str1, String str2)(Code)
Substituate once str1 by str2 in text Commentaire Anglais

author Henri Yves AMAIZO
Parameters:
  text - search and replace in
Parameters:
  str1 - to search for
Parameters:
  str2 - to replace with String replaced




reverseString
public static String reverseString(String str)(Code)
Reverse the String.
Parameters:
  str - the String to reverse. a reversed string



rightPad
public static String rightPad(String str, int n, String delim)(Code)
Right padding with delimiter

author Henri Yves AMAIZO
Parameters:
  str - String
Parameters:
  n - int size of the final string
Parameters:
  delim - padding character String padding string




rightPad
public static String rightPad(String str, int n)(Code)
Right padding delimiter is space

author Henri Yves AMAIZO
Parameters:
  str - String
Parameters:
  n - int size of the new string String




startsAndEnds
public static boolean startsAndEnds(String s, String search)(Code)
determine whether a string both starts and ends with the given substring
Parameters:
  s - string to look at
Parameters:
  search - substring to search for true if string is surrounded by search string



string2List
public static List string2List(String s)(Code)
Convert string to list

author Henri Yves AMAIZO
Parameters:
  s - String comma delimited string to format List




string2List
public static List string2List(String s, String sep)(Code)
Convert string to list using sep separator to divide

author Henri Yves AMAIZO
Parameters:
  s - String comma delimited string to format
Parameters:
  sep - a string containing the seprator characters List




string2List
public static List string2List(String s, String sep, int maxSize)(Code)
Convert string to list using sep separator to divide

author Henri Yves AMAIZO
Parameters:
  s - String comma delimited string to format
Parameters:
  sep - a string containing the seprator characters
Parameters:
  maxSize - the maximum size of the list List




substring
public static String substring(String str, int lg)(Code)
return empty string the string is null

author Henri Yves AMAIZO
Parameters:
  str - The string to split String
Parameters:
  lg - the length to subgstring a substring of parameter str.




substring
public static String substring(String str, int start, int end)(Code)
return empty string the string is null

author Henri Yves AMAIZO
Parameters:
  str - The string to split String
Parameters:
  start - the location to start
Parameters:
  end - the end location of the substring a substring of parameter str.




swapCase
public static String swapCase(String str)(Code)
Reverse the character case in the string

author Henri Yves AMAIZO
Parameters:
  str - String String




toBoolean
final public static boolean toBoolean(String theString)(Code)
parse a boolean value
Parameters:
  theString - the string to parse a boolean value parse from input; if input cannot be parsed, return false



truncate
public static String truncate(String str, int len)(Code)
truncate a string at the given length if necessary, adding an ellipses at the end if truncation occurred; uses ELLIPSES static String from this class
Parameters:
  str - The string to process
Parameters:
  len - The maximum length to process the string to. the appropriately trimmed string.



unUpperFirstChar
public static String unUpperFirstChar(String str)(Code)
convert the first character of string in lower case

author Henri Yves AMAIZO
Parameters:
  str - String to un-upper case the first character String




unquote
public static String unquote(String s)(Code)
remove surrounding quote marks (either "" or ''), only if quotes are at both the beginning and end of the string
Parameters:
  s - string for testing string which has surrounding quotes, if any, removed



upperFirstChar
public static String upperFirstChar(String str)(Code)
convert the first character of the string upper case

author Henri Yves AMAIZO
Parameters:
  str - String to make the first character upper. String




xmlEscape
public static String xmlEscape(String s)(Code)
Formats the string to an XML/XHTML escaped character. Useful for &'s, etc
Parameters:
  s - the String to format The escaped formatted String.
See Also:   org.apache.xml.serialize.BaseMarkupSerializer
See Also:    for example of original
See Also:   code.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.