Função Iterator como "Like" ? [RESOLVIDO]  XML
Índice dos Fóruns » Java Básico
Autor Mensagem
Metaleiro
Virtual Machine Man
[Avatar]

Membro desde: 06/07/2006 10:55:54
Mensagens: 671
Localização: São Bernardo do Campo - SP
Offline

Estou usando isso que pesquisa do começo de uma String:



Exemplo, procura :

JA ele encontra JAVA

Quero procurar:

VA e também achar JAVA e VACUO

Alguém sabe como fazer isso ?

Existiria um contains-with ?

Desde já agradeço !

This message was edited 2 times. Last update was at 31/10/2011 11:14:59


"Why, Mr. Anderson? Why do you do it? Why get up? Why keep fighting? Do you believe you're fighting for something? For more than your survival? Can you tell me what it is? Do you even know? Is it freedom? Or truth? Perhaps peace? Yes? No? Could it be for love? Illusions, Mr. Anderson. Vagaries of perception. The temporary constructs of a feeble human intellect trying desperately to justify an existence that is without meaning or purpose. And all of them as artificial as the Matrix itself, although only a human mind could invent something as insipid as love. You must be able to see it, Mr. Anderson. You must know it by now. You can?t win. It?s pointless to keep fighting. Why, Mr. Anderson? Why? Why do you persist?"

Neo :
-Because is my choice

robertol
JavaBaby
[Avatar]

Membro desde: 14/12/2010 16:05:06
Mensagens: 87
Localização: Salvador - Bahia
Offline

Acredito que neste caso o contains deve servir.

Roberto Leones
OCJP6
Metaleiro
Virtual Machine Man
[Avatar]

Membro desde: 06/07/2006 10:55:54
Mensagens: 671
Localização: São Bernardo do Campo - SP
Offline

robertol wrote:Acredito que neste caso o contains deve servir.


Obrigado, usei dessa forma :


"Why, Mr. Anderson? Why do you do it? Why get up? Why keep fighting? Do you believe you're fighting for something? For more than your survival? Can you tell me what it is? Do you even know? Is it freedom? Or truth? Perhaps peace? Yes? No? Could it be for love? Illusions, Mr. Anderson. Vagaries of perception. The temporary constructs of a feeble human intellect trying desperately to justify an existence that is without meaning or purpose. And all of them as artificial as the Matrix itself, although only a human mind could invent something as insipid as love. You must be able to see it, Mr. Anderson. You must know it by now. You can?t win. It?s pointless to keep fighting. Why, Mr. Anderson? Why? Why do you persist?"

Neo :
-Because is my choice

 
Índice dos Fóruns » Java Básico
Ir para:   
Powered by JForum 2.1.8 © JForum Team