Java Doc for StringUtils.java in  » IDE » tIDE » snow » utils » 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 » IDE » tIDE » snow.utils 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   snow.utils.StringUtils

StringUtils
final public class StringUtils (Code)




Method Summary
public static  StringbalancedRemoveAll(String text, String open, String end)
    
public static  StringbalancedRemoveFirst(String text, String open, String end)
    
public static  intcount(String txt, String item)
    
public static  intcount(String txt, char ci)
    
public static  intcountWords(String txt)
    
public static  StringextractFromFirstToLast_Excluded(String line, String from, String to)
     null if one of from or end not found.
public static  StringextractFromFirstToNext_Excluded(String line, String from, String to)
     null if one of from or end not found.
public static  StringextractFromStartUpToFirstExcluded(String text, String upto)
    
public static  StringfirstLine(String text)
     First line only.
public static  StringformatTime(long millis)
    
public static  intgetColumnNumberForPosition(String txt, int pos)
     the column number (first = 1) at the given position in text.
public static  intgetLineNumberForPosition(String txt, int pos)
    
public static  intgetPositionFor(String cont, int line, int col)
    
public static  StringgetText(String cont, int line, int col, int lineEnd, int colEnd)
     More robust than simple call based on index position.
public static  Stringindent(String txt, String ind, boolean exceptFirstLine)
     Prepend ind to all lines of txt.
public static  intindexOfEndTagIgnoreCase(String text, String tagName)
    
public static  intindexOfIgnoreCases_SLOW(String src, String toSearch)
    
public static  intindexOfStartTagIgnoreCase(String text, String tagName)
    
public static  StringkeepAfterLastExcl(String text, String from)
     null if not found.
public static  voidmain(String[] a)
    
public static  StringremoveAfterLastIncluded(String line, String elt)
    
public static  StringremoveBeforeIncluded(String line, String elt)
    
public static  StringremoveCharsAtEnd(String s, int n)
    
public static  StringremoveFirstLine(String mess)
    
public static  StringremoveLineTailSpaces(String buf)
     remove the \r, and the spaces at the end of the lines.
public static  StringremoveQuotes(String txt, char quote)
    
public static  Stringreplace(String cont, int line, int col, int lineEnd, int colEnd, String with)
     More robust than simple replace based on index position.
public static  StringshortFormForDisplay(String str, int maxLen)
    
public static  booleanstartsWithIgnoresCaseAndBlanks(String text, String start)
    



Method Detail
balancedRemoveAll
public static String balancedRemoveAll(String text, String open, String end)(Code)



balancedRemoveFirst
public static String balancedRemoveFirst(String text, String open, String end)(Code)
For example removing "< * >" items as appearing in a generics type variable declaration <1<2<3> 4> 5> 6> 789



count
public static int count(String txt, String item)(Code)



count
public static int count(String txt, char ci)(Code)



countWords
public static int countWords(String txt)(Code)



extractFromFirstToLast_Excluded
public static String extractFromFirstToLast_Excluded(String line, String from, String to)(Code)
null if one of from or end not found.



extractFromFirstToNext_Excluded
public static String extractFromFirstToNext_Excluded(String line, String from, String to)(Code)
null if one of from or end not found.



extractFromStartUpToFirstExcluded
public static String extractFromStartUpToFirstExcluded(String text, String upto)(Code)
null if not found



firstLine
public static String firstLine(String text)(Code)
First line only.



formatTime
public static String formatTime(long millis)(Code)



getColumnNumberForPosition
public static int getColumnNumberForPosition(String txt, int pos)(Code)
the column number (first = 1) at the given position in text. -1 if bad pos.that is the number of chars backward to the next return.the return itself is considered to be at the end of the line.used because line, col is a robust way to describe a position,absolute positions are not robust.a javax.swing.text.Document will not point to the same char !



getLineNumberForPosition
public static int getLineNumberForPosition(String txt, int pos)(Code)
the line number, 0 for the first, -1 if not found



getPositionFor
public static int getPositionFor(String cont, int line, int col)(Code)
-1 if not found



getText
public static String getText(String cont, int line, int col, int lineEnd, int colEnd)(Code)
More robust than simple call based on index position.



indent
public static String indent(String txt, String ind, boolean exceptFirstLine)(Code)
Prepend ind to all lines of txt.



indexOfEndTagIgnoreCase
public static int indexOfEndTagIgnoreCase(String text, String tagName)(Code)
Finds the index of tagName> the position of >



indexOfIgnoreCases_SLOW
public static int indexOfIgnoreCases_SLOW(String src, String toSearch)(Code)
TODO: boost (copy java.lang.String's method)



indexOfStartTagIgnoreCase
public static int indexOfStartTagIgnoreCase(String text, String tagName)(Code)
Finds the index of <tagName the position of the first letter of the tag, not <



keepAfterLastExcl
public static String keepAfterLastExcl(String text, String from)(Code)
null if not found. Exclude the from from returned string.



main
public static void main(String[] a)(Code)



removeAfterLastIncluded
public static String removeAfterLastIncluded(String line, String elt)(Code)



removeBeforeIncluded
public static String removeBeforeIncluded(String line, String elt)(Code)
the line, where the text before elt has been removed.whole line if elt not found.elt is also removed.



removeCharsAtEnd
public static String removeCharsAtEnd(String s, int n)(Code)



removeFirstLine
public static String removeFirstLine(String mess)(Code)



removeLineTailSpaces
public static String removeLineTailSpaces(String buf)(Code)
remove the \r, and the spaces at the end of the lines. (tail or tailing)



removeQuotes
public static String removeQuotes(String txt, char quote)(Code)



replace
public static String replace(String cont, int line, int col, int lineEnd, int colEnd, String with)(Code)
More robust than simple replace based on index position.



shortFormForDisplay
public static String shortFormForDisplay(String str, int maxLen)(Code)
Long strings are replaced with "start...end"
Parameters:
  maxLen - should be approx 70



startsWithIgnoresCaseAndBlanks
public static boolean startsWithIgnoresCaseAndBlanks(String text, String start)(Code)
Used for example to detect html files (starting with
<html>
) ignores the blanks at the text start



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.