string.html
来自「j2se5-api-zh,java文档的中文版本」· HTML 代码 · 共 1,218 行 · 第 1/5 页
HTML
1,218 行
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="String.html#indexOf(java.lang.String, int)">indexOf</A></B>(<A HREF="String.html" title="java.lang 中的类">String</A> str, int fromIndex)</CODE><BR> 从指定的索引处开始,返回第一次出现的指定子字符串在此字符串中的索引。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="String.html" title="java.lang 中的类">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="String.html#intern()">intern</A></B>()</CODE><BR> 返回字符串对象的规范化表示形式。</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="String.html#lastIndexOf(int)">lastIndexOf</A></B>(int ch)</CODE><BR> 返回最后一次出现的指定字符在此字符串中的索引。</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="String.html#lastIndexOf(int, int)">lastIndexOf</A></B>(int ch, int fromIndex)</CODE><BR> 从指定的索引处开始进行后向搜索,返回最后一次出现的指定字符在此字符串中的索引。</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="String.html#lastIndexOf(java.lang.String)">lastIndexOf</A></B>(<A HREF="String.html" title="java.lang 中的类">String</A> str)</CODE><BR> 返回在此字符串中最右边出现的指定子字符串的索引。</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="String.html#lastIndexOf(java.lang.String, int)">lastIndexOf</A></B>(<A HREF="String.html" title="java.lang 中的类">String</A> str, int fromIndex)</CODE><BR> 从指定的索引处开始向后搜索,返回在此字符串中最后一次出现的指定子字符串的索引。</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="String.html#length()">length</A></B>()</CODE><BR> 返回此字符串的长度。</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="String.html#matches(java.lang.String)">matches</A></B>(<A HREF="String.html" title="java.lang 中的类">String</A> regex)</CODE><BR> 通知此字符串是否匹配给定的<a href="../util/regex/Pattern.html#sum">正则表达式</a>。</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="String.html#offsetByCodePoints(int, int)">offsetByCodePoints</A></B>(int index, int codePointOffset)</CODE><BR> 返回此 <code>String</code> 中从给定的 <code>index</code> 处偏移 <code>codePointOffset</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="String.html#regionMatches(boolean, int, java.lang.String, int, int)">regionMatches</A></B>(boolean ignoreCase, int toffset, <A HREF="String.html" title="java.lang 中的类">String</A> other, int ooffset, int len)</CODE><BR> 测试两个字符串区域是否相等。</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="String.html#regionMatches(int, java.lang.String, int, int)">regionMatches</A></B>(int toffset, <A HREF="String.html" title="java.lang 中的类">String</A> other, int ooffset, int len)</CODE><BR> 测试两个字符串区域是否相等。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="String.html" title="java.lang 中的类">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="String.html#replace(char, char)">replace</A></B>(char oldChar, char newChar)</CODE><BR> 返回一个新的字符串,它是通过用 <code>newChar</code> 替换此字符串中出现的所有 <code>oldChar</code> 而生成的。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="String.html" title="java.lang 中的类">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="String.html#replace(java.lang.CharSequence, java.lang.CharSequence)">replace</A></B>(<A HREF="CharSequence.html" title="java.lang 中的接口">CharSequence</A> target, <A HREF="CharSequence.html" title="java.lang 中的接口">CharSequence</A> replacement)</CODE><BR> 使用指定的字面值替换序列替换此字符串匹配字面值目标序列的每个子字符串。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="String.html" title="java.lang 中的类">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="String.html#replaceAll(java.lang.String, java.lang.String)">replaceAll</A></B>(<A HREF="String.html" title="java.lang 中的类">String</A> regex, <A HREF="String.html" title="java.lang 中的类">String</A> replacement)</CODE><BR> 使用给定的 replacement 字符串替换此字符串匹配给定的<a href="../util/regex/Pattern.html#sum">正则表达式</a>的每个子字符串。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="String.html" title="java.lang 中的类">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="String.html#replaceFirst(java.lang.String, java.lang.String)">replaceFirst</A></B>(<A HREF="String.html" title="java.lang 中的类">String</A> regex, <A HREF="String.html" title="java.lang 中的类">String</A> replacement)</CODE><BR> 使用给定的 replacement 字符串替换此字符串匹配给定的<a href="../util/regex/Pattern.html#sum">正则表达式</a>的第一个子字符串。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="String.html" title="java.lang 中的类">String</A>[]</CODE></FONT></TD><TD><CODE><B><A HREF="String.html#split(java.lang.String)">split</A></B>(<A HREF="String.html" title="java.lang 中的类">String</A> regex)</CODE><BR> 根据给定的正则表达式的匹配来拆分此字符串。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="String.html" title="java.lang 中的类">String</A>[]</CODE></FONT></TD><TD><CODE><B><A HREF="String.html#split(java.lang.String, int)">split</A></B>(<A HREF="String.html" title="java.lang 中的类">String</A> regex, int limit)</CODE><BR> 根据匹配给定的<a href="../util/regex/Pattern.html#sum">正则表达式</a>来拆分此字符串。</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="String.html#startsWith(java.lang.String)">startsWith</A></B>(<A HREF="String.html" title="java.lang 中的类">String</A> prefix)</CODE><BR> 测试此字符串是否以指定的前缀开始。</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="String.html#startsWith(java.lang.String, int)">startsWith</A></B>(<A HREF="String.html" title="java.lang 中的类">String</A> prefix, int toffset)</CODE><BR> 测试此字符串是否以指定前缀开始,该前缀以指定索引开始。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="CharSequence.html" title="java.lang 中的接口">CharSequence</A></CODE></FONT></TD><TD><CODE><B><A HREF="String.html#subSequence(int, int)">subSequence</A></B>(int beginIndex, int endIndex)</CODE><BR> 返回一个新的字符序列,它是此序列的一个子序列。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="String.html" title="java.lang 中的类">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="String.html#substring(int)">substring</A></B>(int beginIndex)</CODE><BR> 返回一个新的字符串,它是此字符串的一个子字符串。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="String.html" title="java.lang 中的类">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="String.html#substring(int, int)">substring</A></B>(int beginIndex, int endIndex)</CODE><BR> 返回一个新字符串,它是此字符串的一个子字符串。</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="String.html#toCharArray()">toCharArray</A></B>()</CODE><BR> 将此字符串转换为一个新的字符数组。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="String.html" title="java.lang 中的类">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="String.html#toLowerCase()">toLowerCase</A></B>()</CODE><BR> 使用默认语言环境的规则将此 <code>String</code> 中的所有字符都转换为小写。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="String.html" title="java.lang 中的类">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="String.html#toLowerCase(java.util.Locale)">toLowerCase</A></B>(<A HREF="../util/Locale.html" title="java.util 中的类">Locale</A> locale)</CODE><BR> 使用给定 <code>Locale</code> 的规则将此 <code>String</code> 中的所有字符都转换为小写。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="String.html" title="java.lang 中的类">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="String.html#toString()">toString</A></B>()</CODE><BR> 返回此对象本身(它已经是一个字符串!)。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="String.html" title="java.lang 中的类">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="String.html#toUpperCase()">toUpperCase</A></B>()</CODE><BR> 使用默认语言环境的规则将此 <code>String</code> 中的所有字符都转换为大写。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="String.html" title="java.lang 中的类">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="String.html#toUpperCase(java.util.Locale)">toUpperCase</A></B>(<A HREF="../util/Locale.html" title="java.util 中的类">Locale</A> locale)</CODE><BR> 使用给定的 <code>Locale</code> 规则将此 <code>String</code> 中的所有字符都转换为大写。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?