Re: [Fwd: Re: [java-list] uso do indexOF......]

2003-03-31 Por tôpico Bruno Emanuel
É mais simples usar o split. No caso a funcao separa : public String[] separa(String email) { String[] retorno = email.split(@); return retorno; } SDS, Bruno Emanuel. Luiz Paulo Cieslak wrote: ) String[] componentes = separa([EMAIL PROTECTED]); public String[]

[Fwd: Re: [java-list] uso do indexOF......]

2003-03-29 Por tôpico Luiz Paulo Cieslak
) String[] componentes = separa([EMAIL PROTECTED]); public String[] separa(String email) { String[] retorno = new String[2]; String retorno[0] = email.substring(0, email.indexOf(@)); String retorno[1] = email.substring(email.indexOf(@) + 1); return retorno; } Um outro exemplo básico é