Click here to Skip to main content
15,888,968 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hi I want to compare characters in char array with another char array or list for ex.
a1a is an item in one array & a1bc is another element in another char array or aa1 compare with a1ab or a3b with a3cb it should return true & after comparing return true or false
Posted
Updated 12-Mar-11 4:03am
v2
Comments
#realJSOP 12-Mar-11 10:06am    
That's not clear at all. What constitutes equality? the position within the list, or that it exists at all in the other list?
Sergey Alexandrovich Kryukov 12-Mar-11 20:29pm    
You explained, but did not get any answer, and this is normal, because this is you turn: show you code and what are the problems? Why do you think it is a problem?
--SA
Toli Cuturicu 14-Mar-11 18:54pm    
Not clear.

1 solution

Your question is not clear. You want to compare char array or list with another char array or list, right? What you did not clearly define is what is your compare criteria? Are you looking for exact match, partial match, any character, any x charcters match?

You example is not clear at all. you said compare a1ab or a3b with a3cb it should return true. Well in the first case a1ab & a3cb matchs a, a*b where as a3b & a3cb matches a3, a*b

so what is your matching criteria?
 
Share this answer
 
Comments
Member 7685573 12-Mar-11 10:33am    
all element in first array should be in second array in any order for ex. arr1:a1a arr2:a1ba a1 is one element

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900