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

string comparison

Im new to .net i doing my project in .net

I need a code for reading a text file and store every string in to an array. Check the array by giving some word.

If the word is found then the full line which the word
contains is store in to a text boxes
Feb 27 '12 #1
1 1697
Falkeli
19
To check if str2 is a substring of str1 (that is, str1 contains str2), use the following line:
Expand|Select|Wrap|Line Numbers
  1. if (str1.Contains(str2))
  2.     //put code here
I hope this helps you.
Mar 1 '12 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: ramin | last post by:
Hi, I would be greately thankful if somebody can give me some information about how string comparison is implemented in mysql. (Both in Physical and Application layer) How queries on string (for...
46
by: yadurajj | last post by:
Hello i am newbie trying to learn C..I need to know about string comparisons in C, without using a library function,...recently I was asked this in an interview..I can write a small program but I...
4
by: Peter Kirk | last post by:
Hi I am looking at some code which in many places performs string comparison using == instead of Equals. Am I right in assuming that this will in fact work "as expected" when it is strings...
1
by: bjjnova | last post by:
I have the following string comparison that is throwing an error I cannot find ( I will include my attempts to trace the error) In the line following the asterisks, written as I have below, a...
4
by: almurph | last post by:
Hi, Hope you can help me with this one. I'm looking for some nice string comparison algorithms. I want to be able to compare 2 strings (fairly smallish, less than 50 characters) and return a %...
9
by: Usman Jamil | last post by:
Hi I'm having a strange error while comparing two strings. Please check the code below. This is a simple string comparison code and works just fine on all of my machines. While debugging an...
14
by: Steve Bergman | last post by:
I'm looking for a module to do fuzzy comparison of strings. I have 2 item master files which are supposed to be identical, but they have thousands of records where the item numbers don't match in...
3
by: questionit | last post by:
Hi I have a string comparison code from VB. While (Not ((myString Like "??????") And (myString Like "00*"))) All i am wondering is if we can do the similar thing in C/C++ i.e using 'Like' ...
3
by: itmfl | last post by:
We are writing a program that multiplies two matrices of size n x m and m x n together. The matrices are stored in a file. The user provides the filename in the command line prompt. The file is...
10
by: lilly07 | last post by:
Hi, I have one column of strings in 1st file file and another file which consists of 5 clumns in each line and my basic objective is to find each item/line of 1st file is available in 3rd column of...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.