wouldn't that never enter the "if" since you're initializing the string var
to "" and then only adding items to it if it's NOT already equal to ""?
sorry, I'm not a perl programmer, so maybe I'm interpreting it wrong... my
pseudo-code would be close to . . . .
myString = ""
for (x=0; x<N; x++) {
if (x==0) {
myString = myString + myArray[x]
} else {
myString = myString + ", " + myArray[x]
}
}
-----Original Message-----
From: A mailing list about Java Server Pages specification andreference
[mailto:[EMAIL PROTECTED]]On Behalf Of Seger, Jeffrey
Sent: Friday, January 26, 2001 4:12 PM
To: [EMAIL PROTECTED]
Subject: Re: De-Tokenizing ?!
In Perl, I'd do some thing like this:
my $new_string ="";
foreach my $item (@array){
if ($new_string ne "") {
$new_string .= $delimiter.$item;
}
}
I'll let you work out the syntax in Java.
-----Original Message-----
From: Mayuresh Kadu (Aftek Infosys, Pune) [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 26, 2001 3:54 PM
To: [EMAIL PROTECTED]
Subject: Re: De-Tokenizing ?!
Peter,
I amused. Can i please asked how ?!
Mayuresh
----- Original Message -----
From: Peter Choe <[EMAIL PROTECTED]>
> yes
>
> "Mayuresh Kadu (Aftek Infosys, Pune)" wrote:
> >
> > hello all,
> >
> > is there anyway in which i can convert a array of Strings into a
Delimited
> > String - sort of "De" Tokenize it
> >
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets