473,326 Members | 2,048 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

eleiminate \n from beginning and end of string

How to do this?

Dec 19 '05 #1
1 1045
pa*******@gmail.com wrote:
How to do this?


In XSLT this would be the normalize-space() function, but it will also
collapse multiple spaces to a single space, and convert newlines to
spaces as well.

Would I be guessing right that you have a document with markup like:

<p>
this is some text
</p>

instead of

<p>this is some text</p>

?

///Peter
--
XML FAQ: http://xml.silmaril.ie/
Dec 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

20
by: Ravi | last post by:
Hi, I have about 200GB of data that I need to go through and extract the common first part of a line. Something like this. >>>a = "abcdefghijklmnopqrstuvwxyz" >>>b = "abcdefghijklmnopBHLHT"...
4
by: AHP | last post by:
Hi, I'm using Visual Studio 2005. I am developing a web application that uses the FileUpload control to upload text files to a directory on a webserver. This works fine. However, for me to be...
3
by: romayankin | last post by:
I'm trying to create PHP trim() function equivalent using pure JS code that truncates spaces from the begging and from the end of the given string. One of the solutions is to use two "while" loops...
11
by: Gustaf | last post by:
Some error handling code: catch (System.Xml.XmlException e) { Console.WriteLine("Error in " + e.SourceUri + ": " + e.Message); return; } The output:
5
by: Curious | last post by:
I have: if (temp.Contains("Account") == true) { temp.Replace("Account", "Client"); } The "Account" is not replaced by "Client" after this operation. I used
5
by: Andrew Wingorodov | last post by:
im made subj like this: inline bool isnt_space (int sp) { return (::isspace (sp)) ? false : true; } str.erase ( std.begin () , std::find_if ( str.begin(), str.end(), isnt_space) );
3
by: Colin J. Williams | last post by:
The Library Reference has strip( ) Return a copy of the string with the leading and trailing characters removed. The chars argument is a string specifying the set of characters to be removed....
7
by: lithiumcat | last post by:
Hi, I'm not yet very confident in my use of standard terminology, so please be kind if I'm mis-calling something, I will do my best no to make it again once pointed out. I'm wondering what is...
20
by: arnimavidyarthy | last post by:
Hi, Hi, I am taking a string as an input from the user and it should only contain the chars:L , M or R I tried the folllowing in kodos but they are still not perfect:
13
by: Hongyu | last post by:
Hi, I have a datetime char string returned from ctime_r, and it is in the format like ""Wed Jun 30 21:49:08 1993\n\0", which has 26 chars including the last terminate char '\0', and i would...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.