Questions tagged [contain]

214 questions
-4
votes
2 answers

How can i check a string whether it contains letters of a given word by user

how can i check a string whether it contains letters of a given word by user like Enter the pattern string: shl Enter a string: school shl occurs in ”school” Enter a string: okul shl does NOT occur in ”okul” Enter a string: salaries are neither…
Makinist
  • 39
  • 1
  • 9
-5
votes
1 answer

How to check if any words present in a string is available in an array c#

i just want to ask if user input sentence is present in the array. like for example "Vince borrow book" then i just want to check if "Vince" "Borrow" and "Book" are present in arrays. im noob string sentence = tbSentence.Text; string[] words =…
-6
votes
2 answers

Compare method for type int

I want to do the following but the only issue is that my input query is int not string and also I am searching from my RoomID which is also an integer and not a string. Let me simplify it, instead of _context.Customers.Name, I am comparing from…
Afnan Makhdoom
  • 654
  • 1
  • 8
  • 20
-6
votes
2 answers

Search for keywords and replace them with their abbreviations

I have a String and list of words. I want to search the each word in that string and replace that word with any shortcut like UPDATE DATABASE to UPD DB. Below are the list of words I need to look for ALTER DATABASE, ALTER TABLE, ALTER VIEW, …
user1771540
  • 103
  • 2
  • 4
  • 11
1 2 3
14
15