cs_amel2006
Messages postés83Date d'inscriptionsamedi 21 janvier 2006StatutMembreDernière intervention 9 décembre 2006
-
10 avril 2006 à 20:23
etudev
Messages postés47Date d'inscriptionvendredi 10 février 2006StatutMembreDernière intervention23 mai 2006
-
10 avril 2006 à 20:40
etudev
Messages postés47Date d'inscriptionvendredi 10 février 2006StatutMembreDernière intervention23 mai 2006 10 avril 2006 à 20:40
Bonjour,
indexOf public int indexOf(String str, int fromIndex) : Returns the index within this string of the first occurrence of the specified substring, starting at the specified index.
Tu peux faire une boucle :
1- recuperer l'index du premier restitle.
2- utiliser la methode suivante:
public String substring(int beginIndex):Returns a new string that is a substring of this string. The substring begins with the character at the specified index and extends to the end of this string. Examples: "unhappy".substring(2) returns "happy"
"Harbison".substring(3) returns "bison"
"emptiness".substring(9) returns "" (an empty string)