def subsequence_match(ref, typed, csc):
 if csc:
  return _subsequence_match_iter(ref, typed)
 else:
  return _subsequence_match_iter(ref.lower(), typed.lower())

def subsequence_match ( ref , typed , csc ) : if csc : return _subsequence_match_iter ( ref , typed ) else : return _subsequence_match_iter ( ref . lower ( ) , typed . lower ( ) )
detects whether typed is a subsequence of ref .