how can we compare two strings ignoring a noise character.

Can anyone tell me how to compare two strings ignoring a noise character…

for example if strings are A####### mi######## t and #### Am#### it## then the function should tell equal ignoring the #…

1 Like
  1. use two iterators for the two strings.
  2. each iterator stops at a ‘sensible’ character i.e. it ignores any ‘#’ in its way.
  3. at an halt of two iterators, compare the two characters at the position.
1 Like

@avinrox Got it thanks :slight_smile:

1 Like

Take pointer to String 1 and a pointer to string 2 and iterate.
Whenever you get a non-noise character compare else ignore and move forward.
Hope it helps