Например:
NSString *file1 = @"Invoice1"; NSString *file2 = @"Invoice2";
Как найти общий шаблон (т. Е. @"Invoice") из вышеприведенных NSString с?
@"Invoice"
NSString
См. NSString s -commonPrefixWithString:options: метод.
-commonPrefixWithString:options: