<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<!--NewPage-->
<html>
<head>
<!-- Generated by javadoc on Wed Jul 28 01:21:15 GMT 1999 -->
<title>
  Class java.lang.String
</title>
</head>
<body>
<a name="_top_"></a>
<pre>
<a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-java.lang.html">This Package</a>  <a href="java.lang.Short.html#_top_">Previous</a>  <a href="java.lang.StringBuffer.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
<hr>
<h1>
  Class java.lang.String
</h1>
<pre>
<a href="java.lang.Object.html#_top_">java.lang.Object</a>
   |
   +----java.lang.String
</pre>
<hr>
<dl>
  <dt> public final class <b>String</b>
  <dt> extends <a href="java.lang.Object.html#_top_">Object</a>
  <dt> implements <a href="java.io.Serializable.html#_top_">Serializable</a>
</dl>
The <code>String</code> class represents character strings. All
 string literals in Java programs, such as <code>"abc"</code>, are
 implemented as instances of this class.
 <p>
 Strings are constant; their values cannot be changed after they
 are created. String buffers support mutable strings.
 Because String objects are immutable they can be shared. For example:
 <p><blockquote><pre>
     String str = "abc";
 </pre></blockquote><p>
 is equivalent to:
 <p><blockquote><pre>
     char data[] = {'a', 'b', 'c'};
     String str = new String(data);
 </pre></blockquote><p>
 Here are some more examples of how strings can be used:
 <p><blockquote><pre>
     System.out.println("abc");
     String cde = "cde";
     System.out.println("abc" + cde);
     String c = "abc".substring(2,3);
     String d = cde.substring(1, 2);
 </pre></blockquote>
 <p>
 The class <code>String</code> includes methods for examining
 individual characters of the sequence, for comparing strings, for
 searching strings, for extracting substrings, and for creating a
 copy of a string with all characters translated to uppercase or to
 lowercase.
 <p>
 The Java language provides special support for the string
 concatentation operator (&nbsp;+&nbsp;), and for conversion of
 other objects to strings. String concatenation is implemented
 through the <code>StringBuffer</code> class and its
 <code>append</code> method.
 String conversions are implemented through the method
 <code>toString</code>, defined by <code>Object</code> and
 inherited by all classes in Java. For additional information on
 string concatenation and conversion, see Gosling, Joy, and Steele,
 <i>The Java Language Specification</i>.
<p>
<dl>
    <dt> <b>See Also:</b>
    <dd> <a href="java.lang.Object.html#toString()">toString</a>, <a href="java.lang.StringBuffer.html#_top_">StringBuffer</a>, <a href="java.lang.StringBuffer.html#append(boolean)">append</a>, <a href="java.lang.StringBuffer.html#append(char)">append</a>, <a href="java.lang.StringBuffer.html#append(char[])">append</a>, <a href="java.lang.StringBuffer.html#append(char[], int, int)">append</a>, <a href="java.lang.StringBuffer.html#append(double)">append</a>, <a href="java.lang.StringBuffer.html#append(float)">append</a>, <a href="java.lang.StringBuffer.html#append(int)">append</a>, <a href="java.lang.StringBuffer.html#append(long)">append</a>, <a href="java.lang.StringBuffer.html#append(java.lang.Object)">append</a>, <a href="java.lang.StringBuffer.html#append(java.lang.String)">append</a>
</dl>
<hr>
<a name="index"></a>
<h2>
  <img src="images/constructor-index.gif" width=275 height=38 alt="Constructor Index">
</h2>
<dl>
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#String()"><b>String</b></a>()
  <dd>  Allocates a new <code>String</code> containing no characters.
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#String(byte[])"><b>String</b></a>(byte[])
  <dd>  Construct a new <code>String</code> by converting the specified array
 of bytes using the platform's default character encoding.
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#String(byte[], int)"><b>String</b></a>(byte[], int)
  <dd>  Allocates a new <code>String</code> containing characters
 constructed from an array of 8-bit integer values.
<b>Deprecated.</b>
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#String(byte[], int, int)"><b>String</b></a>(byte[], int, int)
  <dd>  Construct a new <code>String</code> by converting the specified
 subarray of bytes using the platform's default character encoding.
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#String(byte[], int, int, int)"><b>String</b></a>(byte[], int, int, int)
  <dd>  Allocates a new <code>String</code> constructed from a subarray
 of an array of 8-bit integer values.
<b>Deprecated.</b>
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#String(byte[], int, int, java.lang.String)"><b>String</b></a>(byte[], int, int, String)
  <dd>  Construct a new <code>String</code> by converting the specified
 subarray of bytes using the specified character encoding.
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#String(byte[], java.lang.String)"><b>String</b></a>(byte[], String)
  <dd>  Construct a new <code>String</code> by converting the specified array
 of bytes using the specified character encoding.
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#String(char[])"><b>String</b></a>(char[])
  <dd>  Allocates a new <code>String</code> so that it represents the
 sequence of characters currently contained in the character array
 argument.
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#String(char[], int, int)"><b>String</b></a>(char[], int, int)
  <dd>  Allocates a new <code>String</code> that contains characters from
 a subarray of the character array argument.
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#String(java.lang.String)"><b>String</b></a>(String)
  <dd>  Allocates a new string that contains the same sequence of
 characters as the string argument.
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#String(java.lang.StringBuffer)"><b>String</b></a>(StringBuffer)
  <dd>  Allocates a new string that contains the sequence of characters
 currently contained in the string buffer argument.
</dl>
<h2>
  <img src="images/method-index.gif" width=207 height=38 alt="Method Index">
</h2>
<dl>
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#charAt(int)"><b>charAt</b></a>(int)
  <dd>  Returns the character at the specified index.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#compareTo(java.lang.String)"><b>compareTo</b></a>(String)
  <dd>  Compares two strings lexicographically.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#concat(java.lang.String)"><b>concat</b></a>(String)
  <dd>  Concatenates the specified string to the end of this string.
  <dt> <img src="images/green-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#copyValueOf(char[])"><b>copyValueOf</b></a>(char[])
  <dd>  Returns a String that is equivalent to the specified character array.
  <dt> <img src="images/green-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#copyValueOf(char[], int, int)"><b>copyValueOf</b></a>(char[], int, int)
  <dd>  Returns a String that is equivalent to the specified character array.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#endsWith(java.lang.String)"><b>endsWith</b></a>(String)
  <dd>  Tests if this string ends with the specified suffix.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#equals(java.lang.Object)"><b>equals</b></a>(Object)
  <dd>  Compares this string to the specified object.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#equalsIgnoreCase(java.lang.String)"><b>equalsIgnoreCase</b></a>(String)
  <dd>  Compares this String to another object.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getBytes()"><b>getBytes</b></a>()
  <dd>  Convert this <code>String</code> into bytes according to the platform's
 default character encoding, storing the result into a new byte array.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getBytes(int, int, byte[], int)"><b>getBytes</b></a>(int, int, byte[], int)
  <dd>  Copies characters from this string into the destination byte
 array.
<b>Deprecated.</b>
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getBytes(java.lang.String)"><b>getBytes</b></a>(String)
  <dd>  Convert this <code>String</code> into bytes according to the specified
 character encoding, storing the result into a new byte array.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getChars(int, int, char[], int)"><b>getChars</b></a>(int, int, char[], int)
  <dd>  Copies characters from this string into the destination character array.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#hashCode()"><b>hashCode</b></a>()
  <dd>  Returns a hashcode for this string.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#indexOf(int)"><b>indexOf</b></a>(int)
  <dd>  Returns the index within this string of the first occurrence of the
 specified character.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#indexOf(int, int)"><b>indexOf</b></a>(int, int)
  <dd>  Returns the index within this string of the first occurrence of the
 specified character, starting the search at the specified index.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#indexOf(java.lang.String)"><b>indexOf</b></a>(String)
  <dd>  Returns the index within this string of the first occurrence of the
 specified substring.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#indexOf(java.lang.String, int)"><b>indexOf</b></a>(String, int)
  <dd>  Returns the index within this string of the first occurrence of the
 specified substring, starting at the specified index.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#intern()"><b>intern</b></a>()
  <dd>  Returns a canonical representation for the string object.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#lastIndexOf(int)"><b>lastIndexOf</b></a>(int)
  <dd>  Returns the index within this string of the last occurrence of the
 specified character.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#lastIndexOf(int, int)"><b>lastIndexOf</b></a>(int, int)
  <dd>  Returns the index within this string of the last occurrence of the
 specified character, searching backward starting at the specified index.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#lastIndexOf(java.lang.String)"><b>lastIndexOf</b></a>(String)
  <dd>  Returns the index within this string of the rightmost occurrence
 of the specified substring.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#lastIndexOf(java.lang.String, int)"><b>lastIndexOf</b></a>(String, int)
  <dd>  Returns the index within this string of the last occurrence of
 the specified substring.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#length()"><b>length</b></a>()
  <dd>  Returns the length of this string.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#regionMatches(boolean, int, java.lang.String, int, int)"><b>regionMatches</b></a>(boolean, int, String, int, int)
  <dd>  Tests if two string regions are equal.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#regionMatches(int, java.lang.String, int, int)"><b>regionMatches</b></a>(int, String, int, int)
  <dd>  Tests if two string regions are equal.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#replace(char, char)"><b>replace</b></a>(char, char)
  <dd>  Returns a new string resulting from replacing all occurrences of
 <code>oldChar</code> in this string with <code>newChar</code>.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#startsWith(java.lang.String)"><b>startsWith</b></a>(String)
  <dd>  Tests if this string starts with the specified prefix.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#startsWith(java.lang.String, int)"><b>startsWith</b></a>(String, int)
  <dd>  Tests if this string starts with the specified prefix.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#substring(int)"><b>substring</b></a>(int)
  <dd>  Returns a new string that is a substring of this string.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#substring(int, int)"><b>substring</b></a>(int, int)
  <dd>  Returns a new string that is a substring of this string.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#toCharArray()"><b>toCharArray</b></a>()
  <dd>  Converts this string to a new character array.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#toLowerCase()"><b>toLowerCase</b></a>()
  <dd>  Converts this <code>String</code> to lowercase.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#toLowerCase(java.util.Locale)"><b>toLowerCase</b></a>(Locale)
  <dd>  Converts all of the characters in this <code>String</code> to lower
 case using the rules of the given locale.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#toString()"><b>toString</b></a>()
  <dd>  This object (which is already a string!) is itself returned.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#toUpperCase()"><b>toUpperCase</b></a>()
  <dd>  Converts this string to uppercase.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#toUpperCase(java.util.Locale)"><b>toUpperCase</b></a>(Locale)
  <dd>  Converts all of the characters in this <code>String</code> to upper
 case using the rules of the given locale.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#trim()"><b>trim</b></a>()
  <dd>  Removes white space from both ends of this string.
  <dt> <img src="images/green-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#valueOf(boolean)"><b>valueOf</b></a>(boolean)
  <dd>  Returns the string representation of the <code>boolean</code> argument.
  <dt> <img src="images/green-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#valueOf(char)"><b>valueOf</b></a>(char)
  <dd>  Returns the string representation of the <code>char</code> argument.
  <dt> <img src="images/green-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#valueOf(char[])"><b>valueOf</b></a>(char[])
  <dd>  Returns the string representation of the <code>char</code> array
 argument.
  <dt> <img src="images/green-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#valueOf(char[], int, int)"><b>valueOf</b></a>(char[], int, int)
  <dd>  Returns the string representation of a specific subarray of the
 <code>char</code> array argument.
  <dt> <img src="images/green-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#valueOf(double)"><b>valueOf</b></a>(double)
  <dd>  Returns the string representation of the <code>double</code> argument.
  <dt> <img src="images/green-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#valueOf(float)"><b>valueOf</b></a>(float)
  <dd>  Returns the string representation of the <code>float</code> argument.
  <dt> <img src="images/green-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#valueOf(int)"><b>valueOf</b></a>(int)
  <dd>  Returns the string representation of the <code>int</code> argument.
  <dt> <img src="images/green-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#valueOf(long)"><b>valueOf</b></a>(long)
  <dd>  Returns the string representation of the <code>long</code> argument.
  <dt> <img src="images/green-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#valueOf(java.lang.Object)"><b>valueOf</b></a>(Object)
  <dd>  Returns the string representation of the <code>Object</code> argument.
</dl>
<a name="constructors"></a>
<h2>
  <img src="images/constructors.gif" width=231 height=38 alt="Constructors">
</h2>
<a name="String"></a>
<a name="String()"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>String</b>
<pre>
 public String()
</pre>
<dl>
  <dd> Allocates a new <code>String</code> containing no characters.
<p>
</dl>
<a name="String(java.lang.String)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>String</b>
<pre>
 public String(<a href="#_top_">String</a> value)
</pre>
<dl>
  <dd> Allocates a new string that contains the same sequence of
 characters as the string argument.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> value - a <code>String</code>.
  </dl></dd>
</dl>
<a name="String(char[])"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>String</b>
<pre>
 public String(char value[])
</pre>
<dl>
  <dd> Allocates a new <code>String</code> so that it represents the
 sequence of characters currently contained in the character array
 argument.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> value - the initial value of the string.
  </dl></dd>
</dl>
<a name="String(char[], int, int)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>String</b>
<pre>
 public String(char value[],
               int offset,
               int count)
</pre>
<dl>
  <dd> Allocates a new <code>String</code> that contains characters from
 a subarray of the character array argument. The <code>offset</code>
 argument is the index of the first character of the subarray and
 the <code>count</code> argument specifies the length of the
 subarray.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> value - array that is the source of characters.
    <dd> offset - the initial offset.
    <dd> count - the length.
    <dt> <b>Throws:</b> <a href="java.lang.StringIndexOutOfBoundsException.html#_top_">StringIndexOutOfBoundsException</a>
    <dd> if the <code>offset</code>
               and <code>count</code> arguments index characters outside
               the bounds of the <code>value</code> array.
  </dl></dd>
</dl>
<a name="String(byte[], int, int, int)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>String</b>
<pre>
 public String(byte ascii[],
               int hibyte,
               int offset,
               int count)
</pre>
<dl>
<dd><b> Note: String() is deprecated.</b>
<i>This method does not properly convert bytes into characters.
 As of JDK&nbsp;1.1, the preferred way to do this is via the
 <code>String</code> constructors that take a character-encoding name or
 that use the platform's default encoding.</i>
<p>
  <dd> Allocates a new <code>String</code> constructed from a subarray
 of an array of 8-bit integer values.
 <p>
 The <code>offset</code> argument is the index of the first byte
 of the subarray, and the <code>count</code> argument specifies the
 length of the subarray.
 <p>
 Each <code>byte</code> in the subarray is converted to a
 <code>char</code> as specified in the method above.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> ascii - the bytes to be converted to characters.
    <dd> hibyte - the top 8 bits of each 16-bit Unicode character.
    <dd> offset - the initial offset.
    <dd> count - the length.
    <dt> <b>Throws:</b> <a href="java.lang.StringIndexOutOfBoundsException.html#_top_">StringIndexOutOfBoundsException</a>
    <dd> if the <code>offset</code>
               or <code>count</code> argument is invalid.
    <dt> <b>See Also:</b>
    <dd> <a href="#String(byte[], int)">String</a>, <a href="#String(byte[], int, int, java.lang.String)">String</a>, <a href="#String(byte[], int, int)">String</a>, <a href="#String(byte[], java.lang.String)">String</a>, <a href="#String(byte[])">String</a>
  </dl></dd>
</dl>
<a name="String(byte[], int)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>String</b>
<pre>
 public String(byte ascii[],
               int hibyte)
</pre>
<dl>
<dd><b> Note: String() is deprecated.</b>
<i>This method does not properly convert bytes into characters.
 As of JDK&nbsp;1.1, the preferred way to do this is via the
 <code>String</code> constructors that take a character-encoding name or
 that use the platform's default encoding.</i>
<p>
  <dd> Allocates a new <code>String</code> containing characters
 constructed from an array of 8-bit integer values. Each character
 <i>c</i>in the resulting string is constructed from the
 corresponding component <i>b</i> in the byte array such that:
 <p><blockquote><pre>
     <b><i>c</i></b> == (char)(((hibyte &amp; 0xff) &lt;&lt; 8)
                         | (<b><i>b</i></b> &amp; 0xff))
 </pre></blockquote>
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> ascii - the bytes to be converted to characters.
    <dd> hibyte - the top 8 bits of each 16-bit Unicode character.
    <dt> <b>See Also:</b>
    <dd> <a href="#String(byte[], int, int, java.lang.String)">String</a>, <a href="#String(byte[], int, int)">String</a>, <a href="#String(byte[], java.lang.String)">String</a>, <a href="#String(byte[])">String</a>
  </dl></dd>
</dl>
<a name="String(byte[], int, int, java.lang.String)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>String</b>
<pre>
 public String(byte bytes[],
               int offset,
               int length,
               <a href="#_top_">String</a> enc) throws <a href="java.io.UnsupportedEncodingException.html#_top_">UnsupportedEncodingException</a>
</pre>
<dl>
  <dd> Construct a new <code>String</code> by converting the specified
 subarray of bytes using the specified character encoding.  The length of
 the new <code>String</code> is a function of the encoding, and hence may
 not be equal to the length of the subarray.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> bytes - The bytes to be converted into characters
    <dd> offset - Index of the first byte to convert
    <dd> length - Number of bytes to convert
    <dd> enc - The name of a character encoding
    <dt> <b>Throws:</b> <a href="java.io.UnsupportedEncodingException.html#_top_">UnsupportedEncodingException</a>
    <dd> If the named encoding is not supported
  </dl></dd>
</dl>
<a name="String(byte[], java.lang.String)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>String</b>
<pre>
 public String(byte bytes[],
               <a href="#_top_">String</a> enc) throws <a href="java.io.UnsupportedEncodingException.html#_top_">UnsupportedEncodingException</a>
</pre>
<dl>
  <dd> Construct a new <code>String</code> by converting the specified array
 of bytes using the specified character encoding.  The length of the new
 <code>String</code> is a function of the encoding, and hence may not be
 equal to the length of the byte array.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> bytes - The bytes to be converted into characters
    <dd> enc - A character-encoding name
    <dt> <b>Throws:</b> <a href="java.io.UnsupportedEncodingException.html#_top_">UnsupportedEncodingException</a>
    <dd> If the named encoding is not supported
  </dl></dd>
</dl>
<a name="String(byte[], int, int)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>String</b>
<pre>
 public String(byte bytes[],
               int offset,
               int length)
</pre>
<dl>
  <dd> Construct a new <code>String</code> by converting the specified
 subarray of bytes using the platform's default character encoding.  The
 length of the new <code>String</code> is a function of the encoding, and
 hence may not be equal to the length of the subarray.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> bytes - The bytes to be converted into characters
    <dd> offset - Index of the first byte to convert
    <dd> length - Number of bytes to convert
  </dl></dd>
</dl>
<a name="String(byte[])"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>String</b>
<pre>
 public String(byte bytes[])
</pre>
<dl>
  <dd> Construct a new <code>String</code> by converting the specified array
 of bytes using the platform's default character encoding.  The length of
 the new <code>String</code> is a function of the encoding, and hence may
 not be equal to the length of the byte array.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> bytes - The bytes to be converted into characters
  </dl></dd>
</dl>
<a name="String(java.lang.StringBuffer)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>String</b>
<pre>
 public String(<a href="java.lang.StringBuffer.html#_top_">StringBuffer</a> buffer)
</pre>
<dl>
  <dd> Allocates a new string that contains the sequence of characters
 currently contained in the string buffer argument.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> buffer - a <code>StringBuffer</code>.
  </dl></dd>
</dl>
<a name="methods"></a>
<h2>
  <img src="images/methods.gif" width=151 height=38 alt="Methods">
</h2>
<a name="length()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="length"><b>length</b></a>
<pre>
 public int length()
</pre>
<dl>
  <dd> Returns the length of this string.
 The length is equal to the number of 16-bit
 Unicode characters in the string.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the length of the sequence of characters represented by this
          object.
  </dl></dd>
</dl>
<a name="charAt(int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="charAt"><b>charAt</b></a>
<pre>
 public char charAt(int index)
</pre>
<dl>
  <dd> Returns the character at the specified index. An index ranges
 from <code>0</code> to <code>length() - 1</code>.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> index - the index of the character.
    <dt> <b>Returns:</b>
    <dd> the character at the specified index of this string.
             The first character is at index <code>0</code>.
    <dt> <b>Throws:</b> <a href="java.lang.StringIndexOutOfBoundsException.html#_top_">StringIndexOutOfBoundsException</a>
    <dd> if the index is out of
               range.
  </dl></dd>
</dl>
<a name="getChars(int, int, char[], int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getChars"><b>getChars</b></a>
<pre>
 public void getChars(int srcBegin,
                      int srcEnd,
                      char dst[],
                      int dstBegin)
</pre>
<dl>
  <dd> Copies characters from this string into the destination character array.
 <p>
 The first character to be copied is at index <code>srcBegin</code>;
 the last character to be copied is at index <code>srcEnd-1</code>
 (thus the total number of characters to be copied is
 <code>srcEnd-srcBegin</code>). The characters are copied into the
 subarray of <code>dst</code> starting at index <code>dstBegin</code>
 and ending at index:
 <p><blockquote><pre>
     dstbegin + (srcEnd-srcBegin) - 1
 </pre></blockquote>
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> srcBegin - index of the first character in the string
                        to copy.
    <dd> srcEnd - index after the last character in the string
                        to copy.
    <dd> dst - the destination array.
    <dd> dstBegin - the start offset in the destination array.
    <dt> <b>Throws:</b> <a href="java.lang.StringIndexOutOfBoundsException.html#_top_">StringIndexOutOfBoundsException</a>
    <dd> If srcBegin or srcEnd is out
              of range, or if srcBegin is greater than the srcEnd.
  </dl></dd>
</dl>
<a name="getBytes(int, int, byte[], int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getBytes"><b>getBytes</b></a>
<pre>
 public void getBytes(int srcBegin,
                      int srcEnd,
                      byte dst[],
                      int dstBegin)
</pre>
<dl>
<dd><b> Note: getBytes() is deprecated.</b>
<i>This method does not properly convert characters into bytes.
 As of JDK&nbsp;1.1, the preferred way to do this is via the
 <code>getBytes(String enc)</code> method, which takes a
 character-encoding name, or the <code>getBytes()</code> method, which
 uses the platform's default encoding.</i>
<p>
  <dd> Copies characters from this string into the destination byte
 array. Each byte receives the 8 low-order bits of the
 corresponding character.
 <p>
 The first character to be copied is at index <code>srcBegin</code>;
 the last character to be copied is at index <code>srcEnd-1</code>.
 The total number of characters to be copied is
 <code>srcEnd-srcBegin</code>. The characters, converted to bytes,
 are copied into the subarray of <code>dst</code> starting at index
 <code>dstBegin</code> and ending at index:
 <p><blockquote><pre>
     dstbegin + (srcEnd-srcBegin) - 1
 </pre></blockquote>
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> srcBegin - index of the first character in the string
                        to copy.
    <dd> srcEnd - index after the last character in the string
                        to copy.
    <dd> dst - the destination array.
    <dd> dstBegin - the start offset in the destination array.
    <dt> <b>Throws:</b> <a href="java.lang.StringIndexOutOfBoundsException.html#_top_">StringIndexOutOfBoundsException</a>
    <dd> if srcBegin or srcEnd is out
              of range, or if srcBegin is greater than srcEnd.
  </dl></dd>
</dl>
<a name="getBytes(java.lang.String)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getBytes"><b>getBytes</b></a>
<pre>
 public byte[] getBytes(<a href="#_top_">String</a> enc) throws <a href="java.io.UnsupportedEncodingException.html#_top_">UnsupportedEncodingException</a>
</pre>
<dl>
  <dd> Convert this <code>String</code> into bytes according to the specified
 character encoding, storing the result into a new byte array.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> enc - A character-encoding name
    <dt> <b>Returns:</b>
    <dd> The resultant byte array
    <dt> <b>Throws:</b> <a href="java.io.UnsupportedEncodingException.html#_top_">UnsupportedEncodingException</a>
    <dd> If the named encoding is not supported
  </dl></dd>
</dl>
<a name="getBytes()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getBytes"><b>getBytes</b></a>
<pre>
 public byte[] getBytes()
</pre>
<dl>
  <dd> Convert this <code>String</code> into bytes according to the platform's
 default character encoding, storing the result into a new byte array.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the resultant byte array.
  </dl></dd>
</dl>
<a name="equals(java.lang.Object)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="equals"><b>equals</b></a>
<pre>
 public boolean equals(<a href="java.lang.Object.html#_top_">Object</a> anObject)
</pre>
<dl>
  <dd> Compares this string to the specified object.
 The result is <code>true</code> if and only if the argument is not
 <code>null</code> and is a <code>String</code> object that represents
 the same sequence of characters as this object.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> anObject - the object to compare this <code>String</code>
                     against.
    <dt> <b>Returns:</b>
    <dd> <code>true</code> if the <code>String </code>are equal;
          <code>false</code> otherwise.
    <dt> <b>Overrides:</b>
    <dd> <a href="java.lang.Object.html#equals(java.lang.Object)">equals</a> in class <a href="java.lang.Object.html#_top_">Object</a>
    <dt> <b>See Also:</b>
    <dd> <a href="#compareTo(java.lang.String)">compareTo</a>, <a href="#equalsIgnoreCase(java.lang.String)">equalsIgnoreCase</a>
  </dl></dd>
</dl>
<a name="equalsIgnoreCase(java.lang.String)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="equalsIgnoreCase"><b>equalsIgnoreCase</b></a>
<pre>
 public boolean equalsIgnoreCase(<a href="#_top_">String</a> anotherString)
</pre>
<dl>
  <dd> Compares this String to another object.
 The result is <code>true</code> if and only if the argument is not
 <code>null</code> and is a <code>String</code> object that represents
 the same sequence of characters as this object, where case is ignored.
 <p>
 Two characters are considered the same, ignoring case, if at
 least one of the following is true:
 <ul>
 <li>The two characters are the same (as compared by the <code>==</code>
     operator).
 <li>Applying the method <code>Character.toUppercase</code> to each
     character produces the same result.
 <li>Applying the method <code>Character.toLowercase</code> to each
     character produces the same result.
 </ul>
 <p>
 Two sequences of characters are the same, ignoring case, if the
 sequences have the same length and corresponding characters are
 the same, ignoring case.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> anotherString - the <code>String</code> to compare this
                          <code>String</code> against.
    <dt> <b>Returns:</b>
    <dd> <code>true</code> if the <code>String</code>s are equal,
          ignoring case; <code>false</code> otherwise.
    <dt> <b>See Also:</b>
    <dd> <a href="java.lang.Character.html#toLowerCase(char)">toLowerCase</a>, <a href="java.lang.Character.html#toUpperCase(char)">toUpperCase</a>
  </dl></dd>
</dl>
<a name="compareTo(java.lang.String)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="compareTo"><b>compareTo</b></a>
<pre>
 public int compareTo(<a href="#_top_">String</a> anotherString)
</pre>
<dl>
  <dd> Compares two strings lexicographically.
 The comparison is based on the Unicode value of each character in
 the strings.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> anotherString - the <code>String</code> to be compared.
    <dt> <b>Returns:</b>
    <dd> the value <code>0</code> if the argument string is equal to
          this string; a value less than <code>0</code> if this string
          is lexicographically less than the string argument; and a
          value greater than <code>0</code> if this string is
          lexicographically greater than the string argument.
  </dl></dd>
</dl>
<a name="regionMatches(int, java.lang.String, int, int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="regionMatches"><b>regionMatches</b></a>
<pre>
 public boolean regionMatches(int toffset,
                              <a href="#_top_">String</a> other,
                              int ooffset,
                              int len)
</pre>
<dl>
  <dd> Tests if two string regions are equal.
 <p>
 If <code>toffset</code> or <code>ooffset</code> is negative, or
 if <code>toffset</code>+<code>length</code> is greater than the
 length of this string, or if
 <code>ooffset</code>+<code>length</code> is greater than the
 length of the string argument, then this method returns
 <code>false</code>.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> toffset - the starting offset of the subregion in this string.
    <dd> other - the string argument.
    <dd> ooffset - the starting offset of the subregion in the string
                    argument.
    <dd> len - the number of characters to compare.
    <dt> <b>Returns:</b>
    <dd> <code>true</code> if the specified subregion of this string
          exactly matches the specified subregion of the string argument;
          <code>false</code> otherwise.
  </dl></dd>
</dl>
<a name="regionMatches(boolean, int, java.lang.String, int, int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="regionMatches"><b>regionMatches</b></a>
<pre>
 public boolean regionMatches(boolean ignoreCase,
                              int toffset,
                              <a href="#_top_">String</a> other,
                              int ooffset,
                              int len)
</pre>
<dl>
  <dd> Tests if two string regions are equal.
 <p>
 If <code>toffset</code> or <code>ooffset</code> is negative, or
 if <code>toffset</code>+<code>length</code> is greater than the
 length of this string, or if
 <code>ooffset</code>+<code>length</code> is greater than the
 length of the string argument, then this method returns
 <code>false</code>.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> ignoreCase - if <code>true</code>, ignore case when comparing
                       characters.
    <dd> toffset - the starting offset of the subregion in this
                       string.
    <dd> other - the string argument.
    <dd> ooffset - the starting offset of the subregion in the string
                       argument.
    <dd> len - the number of characters to compare.
    <dt> <b>Returns:</b>
    <dd> <code>true</code> if the specified subregion of this string
          matches the specified subregion of the string argument;
          <code>false</code> otherwise. Whether the matching is exact
          or case insensitive depends on the <code>ignoreCase</code>
          argument.
  </dl></dd>
</dl>
<a name="startsWith(java.lang.String, int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="startsWith"><b>startsWith</b></a>
<pre>
 public boolean startsWith(<a href="#_top_">String</a> prefix,
                           int toffset)
</pre>
<dl>
  <dd> Tests if this string starts with the specified prefix.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> prefix - the prefix.
    <dd> toffset - where to begin looking in the string.
    <dt> <b>Returns:</b>
    <dd> <code>true</code> if the character sequence represented by the
          argument is a prefix of the substring of this object starting
          at index <code>toffset</code>; <code>false</code> otherwise.
  </dl></dd>
</dl>
<a name="startsWith(java.lang.String)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="startsWith"><b>startsWith</b></a>
<pre>
 public boolean startsWith(<a href="#_top_">String</a> prefix)
</pre>
<dl>
  <dd> Tests if this string starts with the specified prefix.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> prefix - the prefix.
    <dt> <b>Returns:</b>
    <dd> <code>true</code> if the character sequence represented by the
          argument is a prefix of the character sequence represented by
          this string; <code>false</code> otherwise.
  </dl></dd>
</dl>
<a name="endsWith(java.lang.String)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="endsWith"><b>endsWith</b></a>
<pre>
 public boolean endsWith(<a href="#_top_">String</a> suffix)
</pre>
<dl>
  <dd> Tests if this string ends with the specified suffix.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> suffix - the suffix.
    <dt> <b>Returns:</b>
    <dd> <code>true</code> if the character sequence represented by the
          argument is a suffix of the character sequence represented by
          this object; <code>false</code> otherwise.
  </dl></dd>
</dl>
<a name="hashCode()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="hashCode"><b>hashCode</b></a>
<pre>
 public int hashCode()
</pre>
<dl>
  <dd> Returns a hashcode for this string.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> a hash code value for this object.
    <dt> <b>Overrides:</b>
    <dd> <a href="java.lang.Object.html#hashCode()">hashCode</a> in class <a href="java.lang.Object.html#_top_">Object</a>
  </dl></dd>
</dl>
<a name="indexOf(int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="indexOf"><b>indexOf</b></a>
<pre>
 public int indexOf(int ch)
</pre>
<dl>
  <dd> Returns the index within this string of the first occurrence of the
 specified character.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> ch - a character.
    <dt> <b>Returns:</b>
    <dd> the index of the first occurrence of the character in the
          character sequence represented by this object, or
          <code>-1</code> if the character does not occur.
  </dl></dd>
</dl>
<a name="indexOf(int, int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="indexOf"><b>indexOf</b></a>
<pre>
 public int indexOf(int ch,
                    int fromIndex)
</pre>
<dl>
  <dd> Returns the index within this string of the first occurrence of the
 specified character, starting the search at the specified index.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> ch - a character.
    <dd> fromIndex - the index to start the search from.
    <dt> <b>Returns:</b>
    <dd> the index of the first occurrence of the character in the
          character sequence represented by this object that is greater
          than or equal to <code>fromIndex</code>, or <code>-1</code>
          if the character does not occur.
  </dl></dd>
</dl>
<a name="lastIndexOf(int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="lastIndexOf"><b>lastIndexOf</b></a>
<pre>
 public int lastIndexOf(int ch)
</pre>
<dl>
  <dd> Returns the index within this string of the last occurrence of the
 specified character.
 The String is searched backwards starting at the last character.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> ch - a character.
    <dt> <b>Returns:</b>
    <dd> the index of the last occurrence of the character in the
          character sequence represented by this object, or
          <code>-1</code> if the character does not occur.
  </dl></dd>
</dl>
<a name="lastIndexOf(int, int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="lastIndexOf"><b>lastIndexOf</b></a>
<pre>
 public int lastIndexOf(int ch,
                        int fromIndex)
</pre>
<dl>
  <dd> Returns the index within this string of the last occurrence of the
 specified character, searching backward starting at the specified index.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> ch - a character.
    <dd> fromIndex - the index to start the search from.
    <dt> <b>Returns:</b>
    <dd> the index of the last occurrence of the character in the
          character sequence represented by this object that is less
          than or equal to <code>fromIndex</code>, or <code>-1</code>
          if the character does not occur before that point.
  </dl></dd>
</dl>
<a name="indexOf(java.lang.String)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="indexOf"><b>indexOf</b></a>
<pre>
 public int indexOf(<a href="#_top_">String</a> str)
</pre>
<dl>
  <dd> Returns the index within this string of the first occurrence of the
 specified substring.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> str - any string.
    <dt> <b>Returns:</b>
    <dd> if the string argument occurs as a substring within this
          object, then the index of the first character of the first
          such substring is returned; if it does not occur as a
          substring, <code>-1</code> is returned.
  </dl></dd>
</dl>
<a name="indexOf(java.lang.String, int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="indexOf"><b>indexOf</b></a>
<pre>
 public int indexOf(<a href="#_top_">String</a> str,
                    int fromIndex)
</pre>
<dl>
  <dd> Returns the index within this string of the first occurrence of the
 specified substring, starting at the specified index.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> str - the substring to search for.
    <dd> fromIndex - the index to start the search from.
    <dt> <b>Returns:</b>
    <dd> If the string argument occurs as a substring within this
          object at a starting index no smaller than
          <code>fromIndex</code>, then the index of the first character
          of the first such substring is returned. If it does not occur
          as a substring starting at <code>fromIndex</code> or beyond,
          <code>-1</code> is returned.
  </dl></dd>
</dl>
<a name="lastIndexOf(java.lang.String)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="lastIndexOf"><b>lastIndexOf</b></a>
<pre>
 public int lastIndexOf(<a href="#_top_">String</a> str)
</pre>
<dl>
  <dd> Returns the index within this string of the rightmost occurrence
 of the specified substring.  The rightmost empty string "" is
 considered to occur at the index value <code>this.length()</code>.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> str - the substring to search for.
    <dt> <b>Returns:</b>
    <dd> if the string argument occurs one or more times as a substring
          within this object, then the index of the first character of
          the last such substring is returned. If it does not occur as
          a substring, <code>-1</code> is returned.
  </dl></dd>
</dl>
<a name="lastIndexOf(java.lang.String, int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="lastIndexOf"><b>lastIndexOf</b></a>
<pre>
 public int lastIndexOf(<a href="#_top_">String</a> str,
                        int fromIndex)
</pre>
<dl>
  <dd> Returns the index within this string of the last occurrence of
 the specified substring.
 The returned index indicates the start of the substring, and it
 must be equal to or less than <code>fromIndex</code>.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> str - the substring to search for.
    <dd> fromIndex - the index to start the search from.
    <dt> <b>Returns:</b>
    <dd> If the string argument occurs one or more times as a substring
          within this object at a starting index no greater than
          <code>fromIndex</code>, then the index of the first character of
          the last such substring is returned. If it does not occur as a
          substring starting at <code>fromIndex</code> or earlier,
          <code>-1</code> is returned.
  </dl></dd>
</dl>
<a name="substring(int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="substring"><b>substring</b></a>
<pre>
 public <a href="#_top_">String</a> substring(int beginIndex)
</pre>
<dl>
  <dd> Returns a new string that is a substring of this string. The
 substring begins at the specified index and extends to the end of
 this string.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> beginIndex - the beginning index, inclusive.
    <dt> <b>Returns:</b>
    <dd> the specified substring.
    <dt> <b>Throws:</b> <a href="java.lang.StringIndexOutOfBoundsException.html#_top_">StringIndexOutOfBoundsException</a>
    <dd> if the
             <code>beginIndex</code> is out of range.
  </dl></dd>
</dl>
<a name="substring(int, int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="substring"><b>substring</b></a>
<pre>
 public <a href="#_top_">String</a> substring(int beginIndex,
                         int endIndex)
</pre>
<dl>
  <dd> Returns a new string that is a substring of this string. The
 substring begins at the specified <code>beginIndex</code> and
 extends to the character at index <code>endIndex - 1</code>.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> beginIndex - the beginning index, inclusive.
    <dd> endIndex - the ending index, exclusive.
    <dt> <b>Returns:</b>
    <dd> the specified substring.
    <dt> <b>Throws:</b> <a href="java.lang.StringIndexOutOfBoundsException.html#_top_">StringIndexOutOfBoundsException</a>
    <dd> if the
             <code>beginIndex</code> or the <code>endIndex</code> is
             out of range.
  </dl></dd>
</dl>
<a name="concat(java.lang.String)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="concat"><b>concat</b></a>
<pre>
 public <a href="#_top_">String</a> concat(<a href="#_top_">String</a> str)
</pre>
<dl>
  <dd> Concatenates the specified string to the end of this string.
 <p>
 If the length of the argument string is <code>0</code>, then this
 object is returned.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> str - the <code>String</code> that is concatenated to the end
                of this <code>String</code>.
    <dt> <b>Returns:</b>
    <dd> a string that represents the concatenation of this object's
          characters followed by the string argument's characters.
  </dl></dd>
</dl>
<a name="replace(char, char)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="replace"><b>replace</b></a>
<pre>
 public <a href="#_top_">String</a> replace(char oldChar,
                       char newChar)
</pre>
<dl>
  <dd> Returns a new string resulting from replacing all occurrences of
 <code>oldChar</code> in this string with <code>newChar</code>.
 <p>
 If the character <code>oldChar</code> does not occur in the
 character sequence represented by this object, then this string is
 returned.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> oldChar - the old character.
    <dd> newChar - the new character.
    <dt> <b>Returns:</b>
    <dd> a string derived from this string by replacing every
          occurrence of <code>oldChar</code> with <code>newChar</code>.
  </dl></dd>
</dl>
<a name="toLowerCase(java.util.Locale)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="toLowerCase"><b>toLowerCase</b></a>
<pre>
 public <a href="#_top_">String</a> toLowerCase(<a href="java.util.Locale.html#_top_">Locale</a> locale)
</pre>
<dl>
  <dd> Converts all of the characters in this <code>String</code> to lower
 case using the rules of the given locale.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> locale - use the case transformation rules for this locale
    <dt> <b>Returns:</b>
    <dd> the String, converted to lowercase.
    <dt> <b>See Also:</b>
    <dd> <a href="java.lang.Character.html#toLowerCase(char)">toLowerCase</a>, <a href="#toUpperCase()">toUpperCase</a>
  </dl></dd>
</dl>
<a name="toLowerCase()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="toLowerCase"><b>toLowerCase</b></a>
<pre>
 public <a href="#_top_">String</a> toLowerCase()
</pre>
<dl>
  <dd> Converts this <code>String</code> to lowercase.
 <p>
 If no character in the string has a different lowercase version,
 based on calling the <code>toLowerCase</code> method defined by
 <code>Character</code>, then the original string is returned.
 <p>
 Otherwise, a new string is allocated, whose length is identical
 to this string, and such that each character that has a different
 lowercase version is mapped to this lowercase equivalent.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the string, converted to lowercase.
    <dt> <b>See Also:</b>
    <dd> <a href="java.lang.Character.html#toLowerCase(char)">toLowerCase</a>, <a href="#toUpperCase()">toUpperCase</a>
  </dl></dd>
</dl>
<a name="toUpperCase(java.util.Locale)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="toUpperCase"><b>toUpperCase</b></a>
<pre>
 public <a href="#_top_">String</a> toUpperCase(<a href="java.util.Locale.html#_top_">Locale</a> locale)
</pre>
<dl>
  <dd> Converts all of the characters in this <code>String</code> to upper
 case using the rules of the given locale.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> locale - use the case transformation rules for this locale
    <dt> <b>Returns:</b>
    <dd> the String, converted to uppercase.
    <dt> <b>See Also:</b>
    <dd> <a href="java.lang.Character.html#toUpperCase(char)">toUpperCase</a>, <a href="#toLowerCase(char)">toLowerCase</a>
  </dl></dd>
</dl>
<a name="toUpperCase()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="toUpperCase"><b>toUpperCase</b></a>
<pre>
 public <a href="#_top_">String</a> toUpperCase()
</pre>
<dl>
  <dd> Converts this string to uppercase.
 <p>
 If no character in this string has a different uppercase version,
 based on calling the <code>toUpperCase</code> method defined by
 <code>Character</code>, then the original string is returned.
 <p>
 Otherwise, a new string is allocated, whose length is identical
 to this string, and such that each character that has a different
 uppercase version is mapped to this uppercase equivalent.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the string, converted to uppercase.
    <dt> <b>See Also:</b>
    <dd> <a href="java.lang.Character.html#toUpperCase(char)">toUpperCase</a>, <a href="#toLowerCase()">toLowerCase</a>
  </dl></dd>
</dl>
<a name="trim()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="trim"><b>trim</b></a>
<pre>
 public <a href="#_top_">String</a> trim()
</pre>
<dl>
  <dd> Removes white space from both ends of this string.
 <p>
 All characters that have codes less than or equal to
 <code>'&#92;u0020'</code> (the space character) are considered to be
 white space.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> this string, with white space removed from the front and end.
  </dl></dd>
</dl>
<a name="toString()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="toString"><b>toString</b></a>
<pre>
 public <a href="#_top_">String</a> toString()
</pre>
<dl>
  <dd> This object (which is already a string!) is itself returned.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the string itself.
    <dt> <b>Overrides:</b>
    <dd> <a href="java.lang.Object.html#toString()">toString</a> in class <a href="java.lang.Object.html#_top_">Object</a>
  </dl></dd>
</dl>
<a name="toCharArray()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="toCharArray"><b>toCharArray</b></a>
<pre>
 public char[] toCharArray()
</pre>
<dl>
  <dd> Converts this string to a new character array.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> a newly allocated character array whose length is the length
          of this string and whose contents are initialized to contain
          the character sequence represented by this string.
  </dl></dd>
</dl>
<a name="valueOf(java.lang.Object)"><img src="images/green-ball.gif" width=12 height=12 alt=" o "></a>
<a name="valueOf"><b>valueOf</b></a>
<pre>
 public static <a href="#_top_">String</a> valueOf(<a href="java.lang.Object.html#_top_">Object</a> obj)
</pre>
<dl>
  <dd> Returns the string representation of the <code>Object</code> argument.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> obj - an <code>Object</code>.
    <dt> <b>Returns:</b>
    <dd> if the argument is <code>null</code>, then a string equal to
          <code>"null"</code>; otherwise, the value of
          <code>obj.toString()</code> is returned.
    <dt> <b>See Also:</b>
    <dd> <a href="java.lang.Object.html#toString()">toString</a>
  </dl></dd>
</dl>
<a name="valueOf(char[])"><img src="images/green-ball.gif" width=12 height=12 alt=" o "></a>
<a name="valueOf"><b>valueOf</b></a>
<pre>
 public static <a href="#_top_">String</a> valueOf(char data[])
</pre>
<dl>
  <dd> Returns the string representation of the <code>char</code> array
 argument.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> data - a <code>char</code> array.
    <dt> <b>Returns:</b>
    <dd> a newly allocated string representing the same sequence of
          characters contained in the character array argument.
  </dl></dd>
</dl>
<a name="valueOf(char[], int, int)"><img src="images/green-ball.gif" width=12 height=12 alt=" o "></a>
<a name="valueOf"><b>valueOf</b></a>
<pre>
 public static <a href="#_top_">String</a> valueOf(char data[],
                              int offset,
                              int count)
</pre>
<dl>
  <dd> Returns the string representation of a specific subarray of the
 <code>char</code> array argument.
 <p>
 The <code>offset</code> argument is the index of the first
 character of the subarray. The <code>count</code> argument
 specifies the length of the subarray.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> data - the character array.
    <dd> offset - the initial offset into the value of the
                  <code>String</code>.
    <dd> count - the length of the value of the <code>String</code>.
    <dt> <b>Returns:</b>
    <dd> a newly allocated string representing the sequence of
          characters contained in the subarray of the character array
          argument.
  </dl></dd>
</dl>
<a name="copyValueOf(char[], int, int)"><img src="images/green-ball.gif" width=12 height=12 alt=" o "></a>
<a name="copyValueOf"><b>copyValueOf</b></a>
<pre>
 public static <a href="#_top_">String</a> copyValueOf(char data[],
                                  int offset,
                                  int count)
</pre>
<dl>
  <dd> Returns a String that is equivalent to the specified character array.
 It creates a new array and copies the characters into it.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> data - the character array.
    <dd> offset - initial offset of the subarray.
    <dd> count - length of the subarray.
    <dt> <b>Returns:</b>
    <dd> a <code>String</code> that contains the characters of the
          specified subarray of the character array.
  </dl></dd>
</dl>
<a name="copyValueOf(char[])"><img src="images/green-ball.gif" width=12 height=12 alt=" o "></a>
<a name="copyValueOf"><b>copyValueOf</b></a>
<pre>
 public static <a href="#_top_">String</a> copyValueOf(char data[])
</pre>
<dl>
  <dd> Returns a String that is equivalent to the specified character array.
 It creates a new array and copies the characters into it.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> data - the character array.
    <dt> <b>Returns:</b>
    <dd> a <code>String</code> that contains the characters of the
          character array.
  </dl></dd>
</dl>
<a name="valueOf(boolean)"><img src="images/green-ball.gif" width=12 height=12 alt=" o "></a>
<a name="valueOf"><b>valueOf</b></a>
<pre>
 public static <a href="#_top_">String</a> valueOf(boolean b)
</pre>
<dl>
  <dd> Returns the string representation of the <code>boolean</code> argument.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> b - a <code>boolean</code>.
    <dt> <b>Returns:</b>
    <dd> if the argument is <code>true</code>, a string equal to
          <code>"true"</code> is returned; otherwise, a string equal to
          <code>"false"</code> is returned.
  </dl></dd>
</dl>
<a name="valueOf(char)"><img src="images/green-ball.gif" width=12 height=12 alt=" o "></a>
<a name="valueOf"><b>valueOf</b></a>
<pre>
 public static <a href="#_top_">String</a> valueOf(char c)
</pre>
<dl>
  <dd> Returns the string representation of the <code>char</code> argument.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> c - a <code>char</code>.
    <dt> <b>Returns:</b>
    <dd> a newly allocated string of length <code>1</code> containing
          as its single character the argument <code>c</code>.
  </dl></dd>
</dl>
<a name="valueOf(int)"><img src="images/green-ball.gif" width=12 height=12 alt=" o "></a>
<a name="valueOf"><b>valueOf</b></a>
<pre>
 public static <a href="#_top_">String</a> valueOf(int i)
</pre>
<dl>
  <dd> Returns the string representation of the <code>int</code> argument.
 <p>
 The representation is exactly the one returned by the
 <code>Integer.toString</code> method of one argument.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> i - an <code>int</code>.
    <dt> <b>Returns:</b>
    <dd> a newly allocated string containing a string representation of
          the <code>int</code> argument.
    <dt> <b>See Also:</b>
    <dd> <a href="java.lang.Integer.html#toString(int, int)">toString</a>
  </dl></dd>
</dl>
<a name="valueOf(long)"><img src="images/green-ball.gif" width=12 height=12 alt=" o "></a>
<a name="valueOf"><b>valueOf</b></a>
<pre>
 public static <a href="#_top_">String</a> valueOf(long l)
</pre>
<dl>
  <dd> Returns the string representation of the <code>long</code> argument.
 <p>
 The representation is exactly the one returned by the
 <code>Long.toString</code> method of one argument.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> l - a <code>long</code>.
    <dt> <b>Returns:</b>
    <dd> a newly allocated string containing a string representation of
          the <code>long</code> argument.
    <dt> <b>See Also:</b>
    <dd> <a href="java.lang.Long.html#toString(long)">toString</a>
  </dl></dd>
</dl>
<a name="valueOf(float)"><img src="images/green-ball.gif" width=12 height=12 alt=" o "></a>
<a name="valueOf"><b>valueOf</b></a>
<pre>
 public static <a href="#_top_">String</a> valueOf(float f)
</pre>
<dl>
  <dd> Returns the string representation of the <code>float</code> argument.
 <p>
 The representation is exactly the one returned by the
 <code>Float.toString</code> method of one argument.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> f - a <code>float</code>.
    <dt> <b>Returns:</b>
    <dd> a newly allocated string containing a string representation of
          the <code>float</code> argument.
    <dt> <b>See Also:</b>
    <dd> <a href="java.lang.Float.html#toString(float)">toString</a>
  </dl></dd>
</dl>
<a name="valueOf(double)"><img src="images/green-ball.gif" width=12 height=12 alt=" o "></a>
<a name="valueOf"><b>valueOf</b></a>
<pre>
 public static <a href="#_top_">String</a> valueOf(double d)
</pre>
<dl>
  <dd> Returns the string representation of the <code>double</code> argument.
 <p>
 The representation is exactly the one returned by the
 <code>Double.toString</code> method of one argument.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> d - a <code>double</code>.
    <dt> <b>Returns:</b>
    <dd> a newly allocated string containing a string representation of
          the <code>double</code> argument.
    <dt> <b>See Also:</b>
    <dd> <a href="java.lang.Double.html#toString(double)">toString</a>
  </dl></dd>
</dl>
<a name="intern()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="intern"><b>intern</b></a>
<pre>
 public native <a href="#_top_">String</a> intern()
</pre>
<dl>
  <dd> Returns a canonical representation for the string object.
 <p>
 If <code>s</code> and <code>t</code> are strings such that
 <code>s.equals(t)</code>, it is guaranteed that<br>
 <code>s.intern() == t.intern(). </code>
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> a string that has the same contents as this string, but is
          guaranteed to be from a pool of unique strings.
  </dl></dd>
</dl>
<hr>
<pre>
<a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-java.lang.html">This Package</a>  <a href="java.lang.Short.html#_top_">Previous</a>  <a href="java.lang.StringBuffer.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
</body>
</html>
