Advertisement

11.10.2005 at 10:11AM PST, ID: 21626709
[x]
Attachment Details

How can I remove newline character from a string

Asked by elyubron in PowerBuilder Programming Language

Tags: newline, remove, string, character

Hello,
I might have a string which contains text, newline characters and spaces which is fine.
And also, I might have a string which contains just newline characters or just spaces or both, which is not fine.

I can remove spaces by using function TRIM(), but I am not sure how to remove newline characters from the string.

I am thinking of using functions Pos() and Replace() in a loop to replace newline characters with nothing, but it is does not look like an altimate way to solve this problem.

Is there any other simpler way to remove newline characters from a string  or my choices are limited and I have to use Pos(0 and Replace() functions.

Thank you

elyubronStart Free Trial
 
Loading Advertisement...
 
[+][-]11.10.2005 at 11:41AM PST, ID: 15268514

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11.10.2005 at 01:30PM PST, ID: 15269517

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11.10.2005 at 08:41PM PST, ID: 15271453

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: PowerBuilder Programming Language
Tags: newline, remove, string, character
Sign Up Now!
Solution Provided By: gafoor78
Participating Experts: 4
Solution Grade: B
 
 
[+][-]11.10.2005 at 09:59PM PST, ID: 15271684

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11.10.2005 at 11:17PM PST, ID: 15271866

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11.10.2005 at 11:26PM PST, ID: 15271904

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32