📄 string.html
字号:
<TD><CODE><B><A HREF="../../java/lang/String.html#getBytes(java.lang.String)">getBytes</A></B>(<A HREF="../../java/lang/String.html">String</A> enc)</CODE>
<BR>
Convert this <code>String</code> into bytes according to the specified character encoding, storing the result into a new byte array.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../java/lang/String.html#getChars(int, int, char[], int)">getChars</A></B>(int srcBegin, int srcEnd, char[] dst, int dstBegin)</CODE>
<BR>
Copies characters from this string into the destination character array.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../java/lang/String.html#hashCode()">hashCode</A></B>()</CODE>
<BR>
Returns a hashcode for this string.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../java/lang/String.html#indexOf(int)">indexOf</A></B>(int ch)</CODE>
<BR>
Returns the index within this string of the first occurrence of the specified character.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../java/lang/String.html#indexOf(int, int)">indexOf</A></B>(int ch, int fromIndex)</CODE>
<BR>
Returns the index within this string of the first occurrence of the specified character, starting the search at the specified index.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../java/lang/String.html#indexOf(java.lang.String)">indexOf</A></B>(<A HREF="../../java/lang/String.html">String</A> str)</CODE>
<BR>
Returns the index within this string of the first occurrence of the specified substring.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../java/lang/String.html#indexOf(java.lang.String, int)">indexOf</A></B>(<A HREF="../../java/lang/String.html">String</A> str, int fromIndex)</CODE>
<BR>
Returns the index within this string of the first occurrence of the specified substring, starting at the specified index.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../java/lang/String.html#lastIndexOf(int)">lastIndexOf</A></B>(int ch)</CODE>
<BR>
Returns the index within this string of the last occurrence of the specified character.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../java/lang/String.html#lastIndexOf(int, int)">lastIndexOf</A></B>(int ch, int fromIndex)</CODE>
<BR>
Returns the index within this string of the last occurrence of the specified character, searching backward starting at the specified index.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../java/lang/String.html#length()">length</A></B>()</CODE>
<BR>
Returns the length of this string.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../java/lang/String.html#regionMatches(boolean, int, java.lang.String, int, int)">regionMatches</A></B>(boolean ignoreCase, int toffset, <A HREF="../../java/lang/String.html">String</A> other, int ooffset, int len)</CODE>
<BR>
Tests if two string regions are equal.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../java/lang/String.html">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../java/lang/String.html#replace(char, char)">replace</A></B>(char oldChar, char newChar)</CODE>
<BR>
Returns a new string resulting from replacing all occurrences of <code>oldChar</code> in this string with <code>newChar</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../java/lang/String.html#startsWith(java.lang.String)">startsWith</A></B>(<A HREF="../../java/lang/String.html">String</A> prefix)</CODE>
<BR>
Tests if this string starts with the specified prefix.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../java/lang/String.html#startsWith(java.lang.String, int)">startsWith</A></B>(<A HREF="../../java/lang/String.html">String</A> prefix, int toffset)</CODE>
<BR>
Tests if this string starts with the specified prefix beginning a specified index.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../java/lang/String.html">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../java/lang/String.html#substring(int)">substring</A></B>(int beginIndex)</CODE>
<BR>
Returns a new string that is a substring of this string.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../java/lang/String.html">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../java/lang/String.html#substring(int, int)">substring</A></B>(int beginIndex, int endIndex)</CODE>
<BR>
Returns a new string that is a substring of this string.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> char[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../java/lang/String.html#toCharArray()">toCharArray</A></B>()</CODE>
<BR>
Converts this string to a new character array.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../java/lang/String.html">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../java/lang/String.html#toLowerCase()">toLowerCase</A></B>()</CODE>
<BR>
Converts all of the characters in this String to lower case.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../java/lang/String.html">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../java/lang/String.html#toString()">toString</A></B>()</CODE>
<BR>
This object (which is already a string!) is itself returned.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../java/lang/String.html">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../java/lang/String.html#toUpperCase()">toUpperCase</A></B>()</CODE>
<BR>
Converts all of the characters in this String to upper case.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../java/lang/String.html">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../java/lang/String.html#trim()">trim</A></B>()</CODE>
<BR>
Removes white space from both ends of this string.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static <A HREF="../../java/lang/String.html">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../java/lang/String.html#valueOf(boolean)">valueOf</A></B>(boolean b)</CODE>
<BR>
Returns the string representation of the <code>boolean</code> argument.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static <A HREF="../../java/lang/String.html">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../java/lang/String.html#valueOf(char)">valueOf</A></B>(char c)</CODE>
<BR>
Returns the string representation of the <code>char</code> argument.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static <A HREF="../../java/lang/String.html">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../java/lang/String.html#valueOf(char[])">valueOf</A></B>(char[] data)</CODE>
<BR>
Returns the string representation of the <code>char</code> array argument.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static <A HREF="../../java/lang/String.html">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../java/lang/String.html#valueOf(char[], int, int)">valueOf</A></B>(char[] data, int offset, int count)</CODE>
<BR>
Returns the string representation of a specific subarray of the <code>char</code> array argument.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static <A HREF="../../java/lang/String.html">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../java/lang/String.html#valueOf(int)">valueOf</A></B>(int i)</CODE>
<BR>
Returns the string representation of the <code>int</code> argument.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static <A HREF="../../java/lang/String.html">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../java/lang/String.html#valueOf(long)">valueOf</A></B>(long l)</CODE>
<BR>
Returns the string representation of the <code>long</code> argument.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static <A HREF="../../java/lang/String.html">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../java/lang/String.html#valueOf(java.lang.Object)">valueOf</A></B>(<A HREF="../../java/lang/Object.html">Object</A> obj)</CODE>
<BR>
Returns the string representation of the <code>Object</code> argument.</TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class java.lang.<A HREF="../../java/lang/Object.html">Object</A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../java/lang/Object.html#getClass()">getClass</A>, <A HREF="../../java/lang/Object.html#notify()">notify</A>, <A HREF="../../java/lang/Object.html#notifyAll()">notifyAll</A>, <A HREF="../../java/lang/Object.html#wait()">wait</A>, <A HREF="../../java/lang/Object.html#wait(long)">wait</A>, <A HREF="../../java/lang/Object.html#wait(long, int)">wait</A></CODE></TD>
</TR>
</TABLE>
<P>
<!-- ============ FIELD DETAIL =========== -->
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -