Java Doc for Str.java in  » Web-Crawler » WebSPHINX » rcm » util » 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 » Web Crawler » WebSPHINX » rcm.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   rcm.util.Str

Str
abstract public class Str (Code)
String utility routines.




Method Summary
public static  Stringabbreviate(String s, int max)
     Abbreviate a string.
public static  StringabbreviateLines(String s, int maxLines, String message)
     Abbreviate a multi-line string.
Parameters:
  s - String to abbreviate
Parameters:
  maxLines - Max number of lines in returned string; must be at least 3
Parameters:
  message - Message to replace removed lines with; should end with\n, but may be multiple lines.
public static  Stringafter(String s, String pat)
     Split string around a substring match and return suffix.
Parameters:
  s - String to split
Parameters:
  pat - Substring to search for in s Suffix of s starting just after the first occurrenceof pat.
public static  Stringbefore(String s, String pat)
     Split string around a substring match and return prefix.
Parameters:
  s - String to split
Parameters:
  pat - Substring to search for in s Prefix of s ending just before the first occurrenceof pat.
public static  StringcompressWhitespace(String s)
     Compress whitespace.
static  intcountLines(String s)
    
public static  booleanendsWithIgnoreCase(String s, String suffix)
     Like String.endsWith, but case-insensitive.
public static  Stringescape(String subject, char escapeChar, String metachars)
     Escapes metacharacters in a string.
public static  Stringescape(String subject, String chars, char escapeChar, String metachars)
     Escapes characters in a string.
Parameters:
  subject - String in which metacharacters are to be escaped
Parameters:
  chars - Characters that need to be escaped (e.g.
public static  intindexOfAnyChar(String subject, String chars)
     Find first occurence of any of a set of characters.
public static  intindexOfAnyChar(String subject, String chars, int start)
     Find first occurence of any of a set of characters, starting at a specified index.
public static  booleanisWhitespace(String s)
     Test if string contains only whitespace.
public static  Stringjoin(String[] list, String sep)
     Concatenate an array of strings.
Parameters:
  list - Array of strings to concatenate
Parameters:
  sep - Separator to insert between each string string consisting of list[0] + sep + list[1] + sep + ...
public static  StringlongestCommonPrefix(String s, String t)
     Find longest common prefix of two strings.
public static  StringlongestCommonPrefixIgnoreCase(String s, String t)
     Find longest common prefix of two strings, ignoring case.
public static  intlongestCommonPrefixLength(String s, String t)
    
public static  intlongestCommonPrefixLengthIgnoreCase(String s, String t)
    
public static  StringlongestCommonSuffix(String s, String t)
     Find longest common suffix of two strings.
public static  StringlongestCommonSuffixIgnoreCase(String s, String t)
     Find longest common suffix of two strings, ignoring case.
public static  intlongestCommonSuffixLength(String s, String t)
    
public static  intlongestCommonSuffixLengthIgnoreCase(String s, String t)
    
static  intnthLine(String s, int n)
    
public static  NumberparseNumber(String s)
    
public static  Stringrepeat(String s, int n)
     Generate a string by concatenating n copies of another string.
public static  Stringreplace(String subject, String original, String replacement)
     Replace all occurences of a string.
public static  Stringreverse(String s)
     Reverse a string.
public static  booleanstartsWithIgnoreCase(String s, String prefix)
     Like String.startsWith, but case-insensitive.
public static  Stringunescape(String subject, char escapeChar, String metachars, String chars, boolean keepUntranslatedEscapes)
     Translate escape sequences (e.g.
public static  Stringuntabify(String s, int tabsize)
     Expands tabs to spaces.



Method Detail
abbreviate
public static String abbreviate(String s, int max)(Code)
Abbreviate a string.
Parameters:
  s - String to abbreviate
Parameters:
  max - Maximum length of returned string; must be at least 5



abbreviateLines
public static String abbreviateLines(String s, int maxLines, String message)(Code)
Abbreviate a multi-line string.
Parameters:
  s - String to abbreviate
Parameters:
  maxLines - Max number of lines in returned string; must be at least 3
Parameters:
  message - Message to replace removed lines with; should end with\n, but may be multiple lines. Occurrences of %d are replaced withthe number of lines removed.



after
public static String after(String s, String pat)(Code)
Split string around a substring match and return suffix.
Parameters:
  s - String to split
Parameters:
  pat - Substring to search for in s Suffix of s starting just after the first occurrenceof pat. If pat is not found in s, returns "".



before
public static String before(String s, String pat)(Code)
Split string around a substring match and return prefix.
Parameters:
  s - String to split
Parameters:
  pat - Substring to search for in s Prefix of s ending just before the first occurrenceof pat. If pat is not found in s, returns s itself.



compressWhitespace
public static String compressWhitespace(String s)(Code)
Compress whitespace.
Parameters:
  s - String to compress string with leading and trailing whitespace removed, andinternal runs of whitespace replaced by a single space character



countLines
static int countLines(String s)(Code)



endsWithIgnoreCase
public static boolean endsWithIgnoreCase(String s, String suffix)(Code)
Like String.endsWith, but case-insensitive.



escape
public static String escape(String subject, char escapeChar, String metachars)(Code)
Escapes metacharacters in a string.
Parameters:
  subject - String in which metacharacters are to be escaped
Parameters:
  escapeChar - the escape character (e.g., \)
Parameters:
  metachars - the metacharacters that should be escaped subject with escapeChar inserted before every character found in metachars



escape
public static String escape(String subject, String chars, char escapeChar, String metachars)(Code)
Escapes characters in a string.
Parameters:
  subject - String in which metacharacters are to be escaped
Parameters:
  chars - Characters that need to be escaped (e.g. "\b\t\r\n\\")
Parameters:
  escapeChar - the escape character (e.g., '\\')
Parameters:
  metachars - escape code letters corresponding to each letter in chars (e.g. "btrn\\")Must have metachars.length () == chars.length(). subject where every occurence of c in chars is replacedby escapeChar followed the character corresponding to c in metachars.



indexOfAnyChar
public static int indexOfAnyChar(String subject, String chars)(Code)
Find first occurence of any of a set of characters.
Parameters:
  subject - String in which to search
Parameters:
  chars - Characters to search for index of first occurence in subject of a character from chars,or -1 if no match.



indexOfAnyChar
public static int indexOfAnyChar(String subject, String chars, int start)(Code)
Find first occurence of any of a set of characters, starting at a specified index.
Parameters:
  subject - String in which to search
Parameters:
  chars - Characters to search for
Parameters:
  start - Starting offset to search from index of first occurence (after start) in subject of a character from chars,or -1 if no match.



isWhitespace
public static boolean isWhitespace(String s)(Code)
Test if string contains only whitespace.
Parameters:
  s - String to test true iff all characters in s satisfy Character.isWhitespace().If s is empty, returns true.



join
public static String join(String[] list, String sep)(Code)
Concatenate an array of strings.
Parameters:
  list - Array of strings to concatenate
Parameters:
  sep - Separator to insert between each string string consisting of list[0] + sep + list[1] + sep + ... + sep + list[list.length-1]



longestCommonPrefix
public static String longestCommonPrefix(String s, String t)(Code)
Find longest common prefix of two strings.



longestCommonPrefixIgnoreCase
public static String longestCommonPrefixIgnoreCase(String s, String t)(Code)
Find longest common prefix of two strings, ignoring case.



longestCommonPrefixLength
public static int longestCommonPrefixLength(String s, String t)(Code)



longestCommonPrefixLengthIgnoreCase
public static int longestCommonPrefixLengthIgnoreCase(String s, String t)(Code)



longestCommonSuffix
public static String longestCommonSuffix(String s, String t)(Code)
Find longest common suffix of two strings.



longestCommonSuffixIgnoreCase
public static String longestCommonSuffixIgnoreCase(String s, String t)(Code)
Find longest common suffix of two strings, ignoring case.



longestCommonSuffixLength
public static int longestCommonSuffixLength(String s, String t)(Code)



longestCommonSuffixLengthIgnoreCase
public static int longestCommonSuffixLengthIgnoreCase(String s, String t)(Code)



nthLine
static int nthLine(String s, int n)(Code)



parseNumber
public static Number parseNumber(String s) throws NumberFormatException(Code)



repeat
public static String repeat(String s, int n)(Code)
Generate a string by concatenating n copies of another string.
Parameters:
  s - String to repeat
Parameters:
  n - number of times to repeat s s concatenated with itself n times



replace
public static String replace(String subject, String original, String replacement)(Code)
Replace all occurences of a string.
Parameters:
  subject - String in which to search
Parameters:
  original - String to search for in subject
Parameters:
  replacement - String to substitute subject with all occurences of original replaced by replacement



reverse
public static String reverse(String s)(Code)
Reverse a string.
Parameters:
  s - String to reverse string containing characters of s in reverse order



startsWithIgnoreCase
public static boolean startsWithIgnoreCase(String s, String prefix)(Code)
Like String.startsWith, but case-insensitive.



unescape
public static String unescape(String subject, char escapeChar, String metachars, String chars, boolean keepUntranslatedEscapes)(Code)
Translate escape sequences (e.g. \r, \n) to characters.
Parameters:
  subject - String in which metacharacters are to be escaped
Parameters:
  escapeChar - the escape character (e.g., \)
Parameters:
  metachars - letters representing escape codes (typically "btrn\\")
Parameters:
  chars - characters corresponding to metachars (typically "\b\t\r\n\\").Must have chars.length () == metachars.length().
Parameters:
  keepUntranslatedEscapes - Controls behavior on unknown escape sequences(see below). subject where every escapeChar followed by c in metacharsis replaced by the character corresponding to c in chars. If an escapesequence is untranslatable (because escapeChar is followed by some character cnot in metachars), then the escapeChar is kept if keepUntranslatedEscapes is true,otherwise the escapeChar is deleted. (The character c is always kept.)



untabify
public static String untabify(String s, int tabsize)(Code)
Expands tabs to spaces.



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.