A
A
Alexey Maltsev2013-12-08 18:28:17
C++ / C#
Alexey Maltsev, 2013-12-08 18:28:17

How to determine if one string contains all the characters of another string?

Please tell me if there is a function in C# that would check for the presence of all characters of one string in another and would return the corresponding boolean value.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Rikcon, 2013-12-08
@Axel_User

msdn.microsoft.com/en-us/library/dy85x1sa (v=vs.110).aspx
Here's what you need.

N
Nikita Permin, 2013-12-09
@NekitoSP

How about ordering the characters of both strings, removing duplicates if necessary (for one more pass of each string), and then just comparing the two resulting strings?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question