Thank you very much for your timely and enlightening inputs. Special thanks
to
Richard Yee
Mark Mascolino-MR
Abhishek Shodhan
Naresh Thawani
Frédérik Delacourt
Scott Evans
Thanks and regards
BRN.
===
To unsubscribe: mailto
: Re: [Re: Proprtionate String Padding]
Java Strings are not advisable as far as possible as each new String Object
will need to be Created in the Memory, and hence will slow down the
Application/Page. and considering that we are programming on the web, we
might
assume that we would get a lot of
ell Holmes
-Original Message-
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Richard Yee
Sent: Monday, July 31, 2000 1:27 PM
To: [EMAIL PROTECTED]
Subject: Re: Proprtionate String Padding
Using a StringBuffer is more efficient th
creating (and destroying) String objects each time you do an append.
With a StringBuffer, you can also easily do a string insertion.
-Richard
-
-Original Message-
From: B R Nair [mailto:[EMAIL PROTECTED]]
Sent: Sunday, July 30, 2000 8:29 PM
To: [EMAIL PROTECTED]
Subject: Re: Proprtionate
Java Strings are not advisable as far as possible as each new String Object
will need to be Created in the Memory, and hence will slow down the
Application/Page. and considering that we are programming on the web, we might
assume that we would get a lot of Hits on the JSP page. That will create ev
That is true for Java but not for javascript.
Did you get over the problem.
-Original Message-
From: B R Nair [mailto:[EMAIL PROTECTED]]
Sent: Sunday, July 30, 2000 10:29 PM
To: [EMAIL PROTECTED]
Subject: Re: Proprtionate String Padding
Thanks a lot Santosh, Naresh & Richard for
Thanks a lot Santosh, Naresh & Richard for your invaluble input.
"Strings are constant; their values cannot be changed after they are
created. String buffers support mutable strings." & "A string buffer is
like a String, but can be modified."
Whenever I read the above Java lanuage documentation
Dear Richard,
Thanks a lot for your time and effort.
This is what exactly I wanted.
Thank you very much.
BRN.
-Original Message-
From: Richard Yee <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Saturday, July 29, 2000 12:10 AM
Subject: Re: Proprti
July 28, 2000 11:08 AM
Subject: Re: Proprtionate String Padding
> Try this
> {
>
> String desiredstring ="", string1 ="";
> string1="column_name";
> desiredstring = string1;
>
> if ( string1.length() != 35 )
> {
> d
If you are displaying the String in a browser, padding the string with
spaces will not produce the desired results since HTML ignores extra spaces
and newline characters. Instead, you need to append " " in place of a
space character.
String padString(String s, int desiredSize)
{
String S
--
From: Daryani Santosh [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 28, 2000 1:08 PM
To: [EMAIL PROTECTED]
Subject: Re: Proprtionate String Padding
Try this
{
String desiredstring ="", string1 ="";
string1="column_name";
desiredstring = string1;
if ( stri
Try this
{
String desiredstring ="", string1 ="";
string1="column_name";
desiredstring = string1;
if ( string1.length() != 35 )
{
desiredstring = string1 + "00";
desiredstring = desiredstring.substring(0,35);
System.out.println("Desired String Length is "+desi
12 matches
Mail list logo