/www/tags/NOV_07_2009/htdocs/api/org/gjt/sp/util/StandardUtilities.html
HTML | 661 lines | 583 code | 67 blank | 11 comment | 0 complexity | e5d4a13128752008787c1db97f763790 MD5 | raw file
Possible License(s): BSD-3-Clause, AGPL-1.0, Apache-2.0, LGPL-2.0, LGPL-3.0, GPL-2.0, CC-BY-SA-3.0, LGPL-2.1, GPL-3.0, MPL-2.0-no-copyleft-exception, IPL-1.0
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- <!--NewPage-->
- <HTML>
- <HEAD>
- <!-- Generated by javadoc (build 1.5.0_14) on Tue Jul 22 07:14:16 GMT-08:00 2008 -->
- <TITLE>
- StandardUtilities (jEdit API)
- </TITLE>
- <META NAME="keywords" CONTENT="org.gjt.sp.util.StandardUtilities class">
- <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
- <NOSCRIPT>
- </NOSCRIPT>
- </HEAD>
- <BODY BGCOLOR="white" >
- <!-- ========= START OF TOP NAVBAR ======= -->
- <A NAME="navbar_top"><!-- --></A>
- <A HREF="#skip-navbar_top" title="Skip navigation links"></A>
- <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
- <TR>
- <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
- <A NAME="navbar_top_firstrow"><!-- --></A>
- <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
- <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="#00008B" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/StandardUtilities.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </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-files/index-1.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="../../../../org/gjt/sp/util/SegmentCharSequence.html" title="class in org.gjt.sp.util"><B>PREV CLASS</B></A>
- <A HREF="../../../../org/gjt/sp/util/StandardUtilities.StringCompare.html" title="class in org.gjt.sp.util"><B>NEXT CLASS</B></A></FONT></TD>
- <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
- <A HREF="../../../../index.html?org/gjt/sp/util/StandardUtilities.html" target="_top"><B>FRAMES</B></A>
- <A HREF="StandardUtilities.html" target="_top"><B>NO FRAMES</B></A>
-
- <NOSCRIPT>
- <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
- </NOSCRIPT>
- </FONT></TD>
- </TR>
- <TR>
- <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
- SUMMARY: <A HREF="#nested_class_summary">NESTED</A> | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
- <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
- DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
- </TR>
- </TABLE>
- <A NAME="skip-navbar_top"></A>
- <!-- ========= END OF TOP NAVBAR ========= -->
- <HR>
- <!-- ======== START OF CLASS DATA ======== -->
- <H2>
- <FONT SIZE="-1">
- org.gjt.sp.util</FONT>
- <BR>
- Class StandardUtilities</H2>
- <PRE>
- java.lang.Object
- <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.gjt.sp.util.StandardUtilities</B>
- </PRE>
- <HR>
- <DL>
- <DT><PRE>public class <B>StandardUtilities</B><DT>extends java.lang.Object</DL>
- </PRE>
- <P>
- Several tools that depends on JDK only.
- <P>
- <P>
- <DL>
- <DT><B>Since:</B></DT>
- <DD>4.3pre5</DD>
- </DL>
- <HR>
- <P>
- <!-- ======== NESTED CLASS SUMMARY ======== -->
- <A NAME="nested_class_summary"><!-- --></A>
- <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
- <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
- <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
- <B>Nested Class Summary</B></FONT></TH>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE>static class</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../../org/gjt/sp/util/StandardUtilities.StringCompare.html" title="class in org.gjt.sp.util">StandardUtilities.StringCompare</A></B></CODE>
- <BR>
- Compares objects as strings.</TD>
- </TR>
- </TABLE>
-
- <!-- ========== METHOD SUMMARY =========== -->
- <A NAME="method_summary"><!-- --></A>
- <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
- <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
- <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
- <B>Method Summary</B></FONT></TH>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE>static java.lang.String</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../../org/gjt/sp/util/StandardUtilities.html#charsToEscapes(java.lang.String)">charsToEscapes</A></B>(java.lang.String str)</CODE>
- <BR>
- Escapes newlines, tabs, backslashes, and quotes in the specified
- string.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE>static java.lang.String</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../../org/gjt/sp/util/StandardUtilities.html#charsToEscapes(java.lang.String, java.lang.String)">charsToEscapes</A></B>(java.lang.String str,
- java.lang.String toEscape)</CODE>
- <BR>
- Escapes the specified characters in the specified string.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE>static int</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../../org/gjt/sp/util/StandardUtilities.html#compareStrings(java.lang.String, java.lang.String, boolean)">compareStrings</A></B>(java.lang.String str1,
- java.lang.String str2,
- boolean ignoreCase)</CODE>
- <BR>
- Compares two strings.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE>static java.lang.String</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../../org/gjt/sp/util/StandardUtilities.html#createWhiteSpace(int, int)">createWhiteSpace</A></B>(int len,
- int tabSize)</CODE>
- <BR>
- Creates a string of white space with the specified length.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE>static java.lang.String</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../../org/gjt/sp/util/StandardUtilities.html#createWhiteSpace(int, int, int)">createWhiteSpace</A></B>(int len,
- int tabSize,
- int start)</CODE>
- <BR>
- Creates a string of white space with the specified length.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE>static java.lang.String</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../../org/gjt/sp/util/StandardUtilities.html#getIndentString(java.lang.String)">getIndentString</A></B>(java.lang.String str)</CODE>
- <BR>
- </TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE>static int</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../../org/gjt/sp/util/StandardUtilities.html#getLeadingWhiteSpace(java.lang.CharSequence)">getLeadingWhiteSpace</A></B>(java.lang.CharSequence str)</CODE>
- <BR>
- Returns the number of leading white space characters in the
- specified string.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE>static int</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../../org/gjt/sp/util/StandardUtilities.html#getLeadingWhiteSpace(java.lang.String)">getLeadingWhiteSpace</A></B>(java.lang.String str)</CODE>
- <BR>
- Returns the number of leading white space characters in the
- specified string.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE>static int</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../../org/gjt/sp/util/StandardUtilities.html#getLeadingWhiteSpaceWidth(java.lang.CharSequence, int)">getLeadingWhiteSpaceWidth</A></B>(java.lang.CharSequence str,
- int tabSize)</CODE>
- <BR>
- Returns the width of the leading white space in the specified
- string.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE>static int</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../../org/gjt/sp/util/StandardUtilities.html#getLeadingWhiteSpaceWidth(java.lang.String, int)">getLeadingWhiteSpaceWidth</A></B>(java.lang.String str,
- int tabSize)</CODE>
- <BR>
- Returns the width of the leading white space in the specified
- string.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE>static int</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../../org/gjt/sp/util/StandardUtilities.html#getOffsetOfVirtualColumn(javax.swing.text.Segment, int, int, int[])">getOffsetOfVirtualColumn</A></B>(javax.swing.text.Segment seg,
- int tabSize,
- int column,
- int[] totalVirtualWidth)</CODE>
- <BR>
- Returns the array offset of a virtual column number (taking tabs
- into account) in the segment.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE>static int</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../../org/gjt/sp/util/StandardUtilities.html#getTrailingWhiteSpace(java.lang.String)">getTrailingWhiteSpace</A></B>(java.lang.String str)</CODE>
- <BR>
- Returns the number of trailing whitespace characters in the
- specified string.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE>static int</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../../org/gjt/sp/util/StandardUtilities.html#getVirtualWidth(javax.swing.text.Segment, int)">getVirtualWidth</A></B>(javax.swing.text.Segment seg,
- int tabSize)</CODE>
- <BR>
- Returns the virtual column number (taking tabs into account) of the
- specified offset in the segment.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE>static java.lang.String</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../../org/gjt/sp/util/StandardUtilities.html#globToRE(java.lang.String)">globToRE</A></B>(java.lang.String glob)</CODE>
- <BR>
- Converts a Unix-style glob to a regular expression.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE>static boolean</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../../org/gjt/sp/util/StandardUtilities.html#objectsEqual(java.lang.Object, java.lang.Object)">objectsEqual</A></B>(java.lang.Object o1,
- java.lang.Object o2)</CODE>
- <BR>
- Returns if two strings are equal.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE>static boolean</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../../org/gjt/sp/util/StandardUtilities.html#regionMatches(java.lang.CharSequence, int, java.lang.CharSequence, int, int)">regionMatches</A></B>(java.lang.CharSequence seq,
- int toff,
- java.lang.CharSequence other,
- int ooff,
- int len)</CODE>
- <BR>
- Implementation of String.regionMatches() for CharSequence.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE>static boolean</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../../org/gjt/sp/util/StandardUtilities.html#startsWith(java.lang.CharSequence, java.lang.String)">startsWith</A></B>(java.lang.CharSequence seq,
- java.lang.String str)</CODE>
- <BR>
- Implementation of String.startsWith() for CharSequence.</TD>
- </TR>
- </TABLE>
- <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
- <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
- <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
- <TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
- </TR>
- </TABLE>
-
- <P>
- <!-- ============ METHOD DETAIL ========== -->
- <A NAME="method_detail"><!-- --></A>
- <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
- <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
- <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
- <B>Method Detail</B></FONT></TH>
- </TR>
- </TABLE>
- <A NAME="charsToEscapes(java.lang.String)"><!-- --></A><H3>
- charsToEscapes</H3>
- <PRE>
- public static java.lang.String <B>charsToEscapes</B>(java.lang.String str)</PRE>
- <DL>
- <DD>Escapes newlines, tabs, backslashes, and quotes in the specified
- string.
- <P>
- <DD><DL>
- <DT><B>Parameters:</B><DD><CODE>str</CODE> - The string<DT><B>Since:</B></DT>
- <DD>jEdit 4.3pre15</DD>
- </DL>
- </DD>
- </DL>
- <HR>
- <A NAME="charsToEscapes(java.lang.String, java.lang.String)"><!-- --></A><H3>
- charsToEscapes</H3>
- <PRE>
- public static java.lang.String <B>charsToEscapes</B>(java.lang.String str,
- java.lang.String toEscape)</PRE>
- <DL>
- <DD>Escapes the specified characters in the specified string.
- <P>
- <DD><DL>
- <DT><B>Parameters:</B><DD><CODE>str</CODE> - The string<DD><CODE>toEscape</CODE> - Any characters that require escaping<DT><B>Since:</B></DT>
- <DD>jEdit 4.3pre15</DD>
- </DL>
- </DD>
- </DL>
- <HR>
- <A NAME="getIndentString(java.lang.String)"><!-- --></A><H3>
- getIndentString</H3>
- <PRE>
- public static java.lang.String <B>getIndentString</B>(java.lang.String str)</PRE>
- <DL>
- <DD><DL>
- <DT><B>Parameters:</B><DD><CODE>str</CODE> - A java string
- <DT><B>Returns:</B><DD>the leading whitespace of that string, for indenting subsequent lines.<DT><B>Since:</B></DT>
- <DD>jEdit 4.3pre10</DD>
- </DL>
- </DD>
- </DL>
- <HR>
- <A NAME="getLeadingWhiteSpace(java.lang.String)"><!-- --></A><H3>
- getLeadingWhiteSpace</H3>
- <PRE>
- public static int <B>getLeadingWhiteSpace</B>(java.lang.String str)</PRE>
- <DL>
- <DD>Returns the number of leading white space characters in the
- specified string.
- <P>
- <DD><DL>
- <DT><B>Parameters:</B><DD><CODE>str</CODE> - The string</DL>
- </DD>
- </DL>
- <HR>
- <A NAME="getLeadingWhiteSpace(java.lang.CharSequence)"><!-- --></A><H3>
- getLeadingWhiteSpace</H3>
- <PRE>
- public static int <B>getLeadingWhiteSpace</B>(java.lang.CharSequence str)</PRE>
- <DL>
- <DD>Returns the number of leading white space characters in the
- specified string.
- <P>
- <DD><DL>
- <DT><B>Parameters:</B><DD><CODE>str</CODE> - The string<DT><B>Since:</B></DT>
- <DD>jEdit 4.3pre15</DD>
- </DL>
- </DD>
- </DL>
- <HR>
- <A NAME="getTrailingWhiteSpace(java.lang.String)"><!-- --></A><H3>
- getTrailingWhiteSpace</H3>
- <PRE>
- public static int <B>getTrailingWhiteSpace</B>(java.lang.String str)</PRE>
- <DL>
- <DD>Returns the number of trailing whitespace characters in the
- specified string.
- <P>
- <DD><DL>
- <DT><B>Parameters:</B><DD><CODE>str</CODE> - The string</DL>
- </DD>
- </DL>
- <HR>
- <A NAME="getLeadingWhiteSpaceWidth(java.lang.String, int)"><!-- --></A><H3>
- getLeadingWhiteSpaceWidth</H3>
- <PRE>
- public static int <B>getLeadingWhiteSpaceWidth</B>(java.lang.String str,
- int tabSize)</PRE>
- <DL>
- <DD>Returns the width of the leading white space in the specified
- string.
- <P>
- <DD><DL>
- <DT><B>Parameters:</B><DD><CODE>str</CODE> - The string<DD><CODE>tabSize</CODE> - The tab size</DL>
- </DD>
- </DL>
- <HR>
- <A NAME="getLeadingWhiteSpaceWidth(java.lang.CharSequence, int)"><!-- --></A><H3>
- getLeadingWhiteSpaceWidth</H3>
- <PRE>
- public static int <B>getLeadingWhiteSpaceWidth</B>(java.lang.CharSequence str,
- int tabSize)</PRE>
- <DL>
- <DD>Returns the width of the leading white space in the specified
- string.
- <P>
- <DD><DL>
- <DT><B>Parameters:</B><DD><CODE>str</CODE> - The string<DD><CODE>tabSize</CODE> - The tab size<DT><B>Since:</B></DT>
- <DD>jEdit 4.3pre15</DD>
- </DL>
- </DD>
- </DL>
- <HR>
- <A NAME="createWhiteSpace(int, int)"><!-- --></A><H3>
- createWhiteSpace</H3>
- <PRE>
- public static java.lang.String <B>createWhiteSpace</B>(int len,
- int tabSize)</PRE>
- <DL>
- <DD>Creates a string of white space with the specified length.<p>
- To get a whitespace string tuned to the current buffer's
- settings, call this method as follows:
- <pre>myWhitespace = MiscUtilities.createWhiteSpace(myLength,
- (buffer.getBooleanProperty("noTabs") ? 0
- : buffer.getTabSize()));</pre>
- <P>
- <DD><DL>
- <DT><B>Parameters:</B><DD><CODE>len</CODE> - The length<DD><CODE>tabSize</CODE> - The tab size, or 0 if tabs are not to be used</DL>
- </DD>
- </DL>
- <HR>
- <A NAME="createWhiteSpace(int, int, int)"><!-- --></A><H3>
- createWhiteSpace</H3>
- <PRE>
- public static java.lang.String <B>createWhiteSpace</B>(int len,
- int tabSize,
- int start)</PRE>
- <DL>
- <DD>Creates a string of white space with the specified length.<p>
- To get a whitespace string tuned to the current buffer's
- settings, call this method as follows:
- <pre>myWhitespace = MiscUtilities.createWhiteSpace(myLength,
- (buffer.getBooleanProperty("noTabs") ? 0
- : buffer.getTabSize()));</pre>
- <P>
- <DD><DL>
- <DT><B>Parameters:</B><DD><CODE>len</CODE> - The length<DD><CODE>tabSize</CODE> - The tab size, or 0 if tabs are not to be used<DD><CODE>start</CODE> - The start offset, for tab alignment</DL>
- </DD>
- </DL>
- <HR>
- <A NAME="getVirtualWidth(javax.swing.text.Segment, int)"><!-- --></A><H3>
- getVirtualWidth</H3>
- <PRE>
- public static int <B>getVirtualWidth</B>(javax.swing.text.Segment seg,
- int tabSize)</PRE>
- <DL>
- <DD>Returns the virtual column number (taking tabs into account) of the
- specified offset in the segment.
- <P>
- <DD><DL>
- <DT><B>Parameters:</B><DD><CODE>seg</CODE> - The segment<DD><CODE>tabSize</CODE> - The tab size</DL>
- </DD>
- </DL>
- <HR>
- <A NAME="getOffsetOfVirtualColumn(javax.swing.text.Segment, int, int, int[])"><!-- --></A><H3>
- getOffsetOfVirtualColumn</H3>
- <PRE>
- public static int <B>getOffsetOfVirtualColumn</B>(javax.swing.text.Segment seg,
- int tabSize,
- int column,
- int[] totalVirtualWidth)</PRE>
- <DL>
- <DD>Returns the array offset of a virtual column number (taking tabs
- into account) in the segment.
- <P>
- <DD><DL>
- <DT><B>Parameters:</B><DD><CODE>seg</CODE> - The segment<DD><CODE>tabSize</CODE> - The tab size<DD><CODE>column</CODE> - The virtual column number<DD><CODE>totalVirtualWidth</CODE> - If this array is non-null, the total
- virtual width will be stored in its first location if this method
- returns -1.
- <DT><B>Returns:</B><DD>-1 if the column is out of bounds</DL>
- </DD>
- </DL>
- <HR>
- <A NAME="compareStrings(java.lang.String, java.lang.String, boolean)"><!-- --></A><H3>
- compareStrings</H3>
- <PRE>
- public static int <B>compareStrings</B>(java.lang.String str1,
- java.lang.String str2,
- boolean ignoreCase)</PRE>
- <DL>
- <DD>Compares two strings.<p>
- Unlike <function>String.compareTo()</function>,
- this method correctly recognizes and handles embedded numbers.
- For example, it places "My file 2" before "My file 10".<p>
- <P>
- <DD><DL>
- <DT><B>Parameters:</B><DD><CODE>str1</CODE> - The first string<DD><CODE>str2</CODE> - The second string<DD><CODE>ignoreCase</CODE> - If true, case will be ignored
- <DT><B>Returns:</B><DD>negative If str1 < str2, 0 if both are the same,
- positive if str1 > str2<DT><B>Since:</B></DT>
- <DD>jEdit 4.3pre5</DD>
- </DL>
- </DD>
- </DL>
- <HR>
- <A NAME="objectsEqual(java.lang.Object, java.lang.Object)"><!-- --></A><H3>
- objectsEqual</H3>
- <PRE>
- public static boolean <B>objectsEqual</B>(java.lang.Object o1,
- java.lang.Object o2)</PRE>
- <DL>
- <DD>Returns if two strings are equal. This correctly handles null pointers,
- as opposed to calling <code>o1.equals(o2)</code>.
- <P>
- <DD><DL>
- <DT><B>Since:</B></DT>
- <DD>jEdit 4.3pre6</DD>
- </DL>
- </DD>
- </DL>
- <HR>
- <A NAME="globToRE(java.lang.String)"><!-- --></A><H3>
- globToRE</H3>
- <PRE>
- public static java.lang.String <B>globToRE</B>(java.lang.String glob)</PRE>
- <DL>
- <DD>Converts a Unix-style glob to a regular expression.<p>
- ? becomes ., * becomes .*, {aa,bb} becomes (aa|bb).
- <P>
- <DD><DL>
- <DT><B>Parameters:</B><DD><CODE>glob</CODE> - The glob pattern<DT><B>Since:</B></DT>
- <DD>jEdit 4.3pre7</DD>
- </DL>
- </DD>
- </DL>
- <HR>
- <A NAME="regionMatches(java.lang.CharSequence, int, java.lang.CharSequence, int, int)"><!-- --></A><H3>
- regionMatches</H3>
- <PRE>
- public static boolean <B>regionMatches</B>(java.lang.CharSequence seq,
- int toff,
- java.lang.CharSequence other,
- int ooff,
- int len)</PRE>
- <DL>
- <DD>Implementation of String.regionMatches() for CharSequence.
- <P>
- <DD><DL>
- <DT><B>Parameters:</B><DD><CODE>seq</CODE> - The test CharSequence.<DD><CODE>toff</CODE> - Offset for the test sequence.<DD><CODE>other</CODE> - The sequence to compare to.<DD><CODE>ooff</CODE> - Offset of the comparison sequence.<DD><CODE>len</CODE> - How many characters to compare.
- <DT><B>Returns:</B><DD>Whether the two subsequences are equal.<DT><B>Since:</B></DT>
- <DD>jEdit 4.3pre15</DD>
- <DT><B>See Also:</B><DD><CODE>String.regionMatches(int,String,int,int)</CODE></DL>
- </DD>
- </DL>
- <HR>
- <A NAME="startsWith(java.lang.CharSequence, java.lang.String)"><!-- --></A><H3>
- startsWith</H3>
- <PRE>
- public static boolean <B>startsWith</B>(java.lang.CharSequence seq,
- java.lang.String str)</PRE>
- <DL>
- <DD>Implementation of String.startsWith() for CharSequence.
- <P>
- <DD><DL>
- <DT><B>Parameters:</B><DD><CODE>seq</CODE> - The CharSequence.<DD><CODE>str</CODE> - String to test.
- <DT><B>Returns:</B><DD>Whether the sequence starts with the test string.<DT><B>Since:</B></DT>
- <DD>jEdit 4.3pre15</DD>
- </DL>
- </DD>
- </DL>
- <!-- ========= END OF CLASS DATA ========= -->
- <HR>
- <!-- ======= START OF BOTTOM NAVBAR ====== -->
- <A NAME="navbar_bottom"><!-- --></A>
- <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
- <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
- <TR>
- <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
- <A NAME="navbar_bottom_firstrow"><!-- --></A>
- <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
- <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="#00008B" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/StandardUtilities.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </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-files/index-1.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="../../../../org/gjt/sp/util/SegmentCharSequence.html" title="class in org.gjt.sp.util"><B>PREV CLASS</B></A>
- <A HREF="../../../../org/gjt/sp/util/StandardUtilities.StringCompare.html" title="class in org.gjt.sp.util"><B>NEXT CLASS</B></A></FONT></TD>
- <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
- <A HREF="../../../../index.html?org/gjt/sp/util/StandardUtilities.html" target="_top"><B>FRAMES</B></A>
- <A HREF="StandardUtilities.html" target="_top"><B>NO FRAMES</B></A>
-
- <NOSCRIPT>
- <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
- </NOSCRIPT>
- </FONT></TD>
- </TR>
- <TR>
- <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
- SUMMARY: <A HREF="#nested_class_summary">NESTED</A> | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
- <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
- DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
- </TR>
- </TABLE>
- <A NAME="skip-navbar_bottom"></A>
- <!-- ======== END OF BOTTOM NAVBAR ======= -->
- <HR>
- </BODY>
- </HTML>