string

  • Thread starter Thread starter Fei
  • Start date Start date
F

Fei

Hi,

I have a simple problem. I have a string variable. Somehow it has Enter
in the string. So When I show this string in a textbox, it will
automatically add one Enter at the end.

My question is how to trim off this Enter. If I use Trim() from String
class, It only removes the Empty space.

Dim strTest as string
strTest.Trim(); ----------> This can NOT remove Enter.


Thanks in advance.

Fei
 
newstring = replace(oldstring, chr(10), "")

if chr(10) doesn't work try chr(13)

chr(10) is carriage return and chr(13) is line feed
 
thanks. chr(13) works for me.

Fei

sherman said:
newstring = replace(oldstring, chr(10), "")

if chr(10) doesn't work try chr(13)

chr(10) is carriage return and chr(13) is line feed
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top