cool!
-----Original Message-----
From: Neil Stevens [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 16, 2002 6:03 PM
To: JDJList
Subject: [jdjlist] Re: repeating a character n times in JSP
wouldn't you do more like :-
char arr[size] = new char[size];
Arrays.fill( arr, 'x' );
new String(arr);
??
At 10:23 16/05/2002 -0500, you wrote:
>You can create a StringBuffer object to do this. Within a for loop call
>the append(char c) method of StringBuffer for each occurrence. It is
>fairly easy to put this in a method where you pass the character and the
>number of occurrences. Once you have the StringBuffer built you can call
>the toString() method and pass it back.. The String can then be used or
>display as needed.
>
>
>
>
>
> "Emmanuel
> Eze"
>
> <eze@systemspe To: "JDJList"
> <[EMAIL PROTECTED]>
> cs.com.ng> cc:
>
> Subject: [jdjlist] repeating
> a character n times in JSP
> 05/16/02
> 09:18
>
> AM
>
> Please
> respond
>
> to
> "JDJList"
>
>
>
>
>
>
>
>
>
>Hi all,
>
>Does anyone know any java class or method that will enable me repeat a
>character n times?
>
>Example: if I want "******", I will call methodname('*',6).
>
>Thanks in advance
>
>Emma
>
>
>To change your membership options, refer to:
>http://www.sys-con.com/java/list.cfm
>
>
>
>
>
>To change your membership options, refer to:
>http://www.sys-con.com/java/list.cfm
To change your membership options, refer to:
http://www.sys-con.com/java/list.cfm
To change your membership options, refer to:
http://www.sys-con.com/java/list.cfm