how to insert space in a string
- From: KC <kenchengtk@xxxxxxxxx>
- Date: Fri, 31 Oct 2008 07:42:17 -0700 (PDT)
Hi all,
I m new in Java, Im not know well about Java syntax, for now, I need
to reform a string var, find out the newline char ( "\r\n" ) and
replace it with specify no. of Space char ( " " ), in order to get the
result string char with 50 * (no.of line) char,
example as blow:
" The group you are posting to is a Usenet group.\r\nMessages posted
to this group\r\nWill make your email address\r\n"
orginal sting change it into
"The group you are posting to is a Usenet group. " +
"Messages posted to this group
" +
"Will make your email
address "
for each line contains exactly 50 char
Thx all for attention,
.
- Follow-Ups:
- Re: how to insert space in a string
- From: Roedy Green
- Re: how to insert space in a string
- From: Mark Space
- Re: how to insert space in a string
- From: KC
- Re: how to insert space in a string
- Prev by Date: diff values for java.home
- Next by Date: Re: how to insert space in a string
- Previous by thread: diff values for java.home
- Next by thread: Re: how to insert space in a string
- Index(es):
Relevant Pages
|