20.12
java.lang.String
THE PACKAGE JAVA.LANG
20.12.27
public int lastIndexOf(int ch)
If a character with value
ch
occurs in the character sequence represented by this
String
object, then the index of the last such occurrence is returned that is, the
largest value
k
such that:
this.charAt(k) == ch
is true. If no such character occurs in this string, then
1
is returned.
20.12.28
public int lastIndexOf(int ch, int fromIndex)
If a character with value
ch
occurs in the character sequence represented by this
String
object at an index no larger than
fromIndex
, then the index of the last
such occurrence is returned that is, the largest value
k
such that:
(this.charAt(k) == ch) && (k <= fromIndex)
is true. If no such character occurs in this string at or before position
fromIndex
,
then
1
is returned.
There is no restriction on the value of
fromIndex
. If it is greater than or equal
to the length of this string, it has the same effect as if it were equal to one less than
the length of this string: this entire string may be searched. If it is negative, it has
the same effect as if it were
1
:
1
is returned.
20.12.29
public int lastIndexOf(String str)
throws NullPointerException
If the string
str
occurs as a substring of this
String
object, then the index of the
first character of the last such substring is returned that is, the largest value
k
such that:
this.startsWith(str, k)
is true. If
str
does not occur as a substring of this string, then
1
is returned.
If
str
is
null
, a
NullPointerException
is thrown.
20.12.30
public int lastIndexOf(String str, int fromIndex)
throws NullPointerException
If the string
str
occurs as a substring of this
String
object starting at an index no
larger than
fromIndex
, then the index of the first character of the last such sub
string is returned that is, the largest value
k
such that:
542
footer
Our partners:
PHP: Hypertext Preprocessor Best Web Hosting
Java Web Hosting
Inexpensive Web Hosting
Jsp Web Hosting
Cheapest Web Hosting
Jsp Hosting
Cheap Hosting
Visionwebhosting.net Business web hosting division of Web
Design Plus. All rights reserved