View Full Version : [JAvA] cercare una stringa in una stringa
blackknight
20-10-2005, 17:32
Ciao a tutti,qualcumo mi suggerisce il modo per cercare una stringa in una stringa + lunga?Mi spiego meglio io devo implementare un algoritmo di ricerca in un mio piccolo progetto.In pratica data una stringa devo ricercare tutti i campi di un database MySql che la contengono.Come posso fare?
contains
public boolean contains(CharSequence s)
Returns true if and only if this string contains the specified sequence of char values.
Parameters:
s - the sequence to search for
Returns:
true if this string contains s, false otherwise
Throws:
NullPointerException - if s is null
Since:
1.5
blackknight
20-10-2005, 19:11
contains
public boolean contains(CharSequence s)
Returns true if and only if this string contains the specified sequence of char values.
Parameters:
s - the sequence to search for
Returns:
true if this string contains s, false otherwise
Throws:
NullPointerException - if s is null
Since:
1.5
:D grazie...mi sa che sono proprio fuso...
vBulletin® v3.6.4, Copyright ©2000-2025, Jelsoft Enterprises Ltd.