Convert method name to string for matching.