How to compare two undefined strings?

Posted by Gudevg under C# on 3/29/2012 | Points: 10 | Views : 1319 | Status : [Member] | Replies : 7
Good day all,

In c# I need to compare two undefined strings. Is it possible to compare? Guide me the logic how to solve this.

Example:


I had a paragraph, need to get every word as a input string2 and have to compare with string1

String1:
Bandura


String2:
Input paragraph:
It must be recognised that, although used in similar studies elsewhere (Goldberg et al. 2003, 2010; Caven et al. 2007), the self-reporting of perceived preparedness (particularly when assessed prior to starting work) is a potential limitation of this study. However, perceptions of ability are precursors to behaviour (Bandura 1996), and so should not be dismissed. In this study, the triangulating data from experienced staff who subsequently worked with this cohort of students largely confirmed their perceptions, as did follow-up interviews with graduates 4 and 12 months into their FY1 year (Willing et al. 2008b).

Give me any idea to compare the strings?


Thanks,
Deeps

Deepakkumar G.


Responses

Posted by: Rajni.Shekhar on: 3/29/2012 [Member] Bronze | Points: 25

Up
0
Down
do you want to extract the position of string1, or what, stringCompare just compare two given strings, and return 0 <1 and >1 so what is your purpose?

Thanks,
Rajni Shekhar

Gudevg, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Gudevg on: 3/29/2012 [Member] Starter | Points: 25

Up
0
Down
Have to compare two strings and print the output whether the word is occur or not. Just similar to Ctrl+F.

String2 is occur inside the paragraph.

Note:
String1 is predefined


Deepakkumar G.

Gudevg, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Rajni.Shekhar on: 3/29/2012 [Member] Bronze | Points: 25

Up
0
Down
that mean you want to search a string in specified paragraph. ok let me try to do it.

Thanks,
Rajni Shekhar

Gudevg, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Gudevg on: 3/29/2012 [Member] Starter | Points: 25

Up
0
Down
Yes you are correct.

Thanking you for your support

Thanks
Deepakkumar G.

Deepakkumar G.

Gudevg, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Rajni.Shekhar on: 3/29/2012 [Member] Bronze | Points: 25

Up
0
Down
check this site,..

http://msdn.microsoft.com/en-us/library/f1f367bx(v=vs.90).aspx

Thanks,
Rajni Shekhar

Gudevg, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Gudevg on: 3/29/2012 [Member] Starter | Points: 25

Up
0
Down
Thank U Rajni:-)



Deepakkumar G.

Gudevg, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Ksuresh on: 3/29/2012 [Member] Starter | Points: 25

Up
0
Down
Hi,

Do you know how to do the below Question?

http://www.dotnetfunda.com/forums/thread8800-on-click-of-the-radio-button-event-should-fire-to-display-the-answer.aspx

Thanks

Gudevg, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response