473,396 Members | 1,683 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,396 software developers and data experts.

How to Detect New Line character

Hi all,

I need to check whether my richtextbox contain any blank line. the source I
try to used in below. but it not reflect the output I need. basically I
need the collect the paragraph by paragraph text in a the rich text box to a
string array.

THEJAN


// Source
for(int counter=0; counter < tempArray.Length;counter++)
{
string mask = "\r\n";
if (tempArray[counter] == mask)

{

MessageBox.Show("Bingo I found a Blank Para Separation");
}

else

{

//MessageBox.Show(tempArray[counter]);

MessageBox.Show("No New Line Found..");

}
}

Nov 15 '05 #1
2 11580
Hi, Thejan Mendis,

Maybe the Lines property is what you are looking for:

http://msdn.microsoft.com/library/en...linestopic.asp

Greetings
Martin
"Thejan Mendis" <tm*****@textcentric.lk> wrote in message
news:O$**************@TK2MSFTNGP10.phx.gbl...
Hi all,

I need to check whether my richtextbox contain any blank line. the source I try to used in below. but it not reflect the output I need. basically I
need the collect the paragraph by paragraph text in a the rich text box to a string array.

THEJAN


// Source
for(int counter=0; counter < tempArray.Length;counter++)
{
string mask = "\r\n";
if (tempArray[counter] == mask)

{

MessageBox.Show("Bingo I found a Blank Para Separation");
}

else

{

//MessageBox.Show(tempArray[counter]);

MessageBox.Show("No New Line Found..");

}
}

Nov 15 '05 #2
I found on the Microsoft site a MSDN TV show done by 'Alex
Kipman' which showed how MSBuild works, the link is
http://msdn.microsoft.com/msdntv/episode.aspx?
xml=episodes/en/20040122VSNETAK/manifest.xml

Basically Whidbey is totally integrated with MSBuild so
you only now need to understand the MSBuild script.

Thanks,
-----Original Message-----
Hi all,

I need to check whether my richtextbox contain any blank line. the source Itry to used in below. but it not reflect the output I need. basically Ineed the collect the paragraph by paragraph text in a the rich text box to astring array.

THEJAN


// Source
for(int counter=0; counter < tempArray.Length;counter++)
{
string mask = "\r\n";
if (tempArray[counter] == mask)

{

MessageBox.Show("Bingo I found a Blank Para Separation");
}

else

{

//MessageBox.Show(tempArray[counter]);

MessageBox.Show("No New Line Found..");

}
}

.

Nov 15 '05 #3

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

Similar topics

8
by: R. Rajesh Jeba Anbiah | last post by:
Here is a nice code to detect utf-8 <http://in2.php.net/utf8_encode#39986> But, I couldn't find out the logic behind the script. If anyone knows that please share. Particularly I would like to...
1
by: Roy | last post by:
Hi, I have a problem that I have been working with for a while. I need to be able from server side (asp.net) to detect that the file i'm streaming down to the client is saved...
2
by: dever | last post by:
I checked my color printers's Printersettings.SupportsColor, which all showed false. What is wrong that I could not use this property. Also, what other way to detect if a printer is color...
10
by: Jonathan Smith | last post by:
I have a VB app that has a richtextbox with the word wrap set to true. I need to be able to output the text to a text file, but it just puts the text in the file as one long line. How do i...
13
by: Michal | last post by:
Hello, is there any way how to detect string encoding in Python? I need to proccess several files. Each of them could be encoded in different charset (iso-8859-2, cp1250, etc). I want to detect...
2
by: Dmitry Anikin | last post by:
I want to read stdin in chunks of fixed size until EOF I want to be able (also) to supply data interactively in console window and then to hit Ctrl+Z when finished So what I do is: while True:...
2
by: sachinik19 | last post by:
Hi, We are using SAXParser (xerces) for parsing an xml with utf-8 encoding. For some special character it gives SAXException with error message - "The invalid character is found in the document...
0
by: Robert Boone | last post by:
Is there any way to detect the real character set use in columns? I've just seen a mysql 4.0 database where the default character set was latin1 but greek was being inserted. When that database was...
7
by: Peter | last post by:
Hello I have an UTF string, how can i detect what language it is? thanks from Peter (cmk128@hotmail.com)
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.