I have a function written in C#, i want to convert it to objective-c. How to do it?
public static string UnicodeUnSign(string s)
{
const string uniChars = \"
Without resorting to core foundation:
#import
int main (int argc, const char *argv[]) {
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
NSString *unicodeCharacters = @"àáảãạâầấẩẫậăằắẳẵặèéẻẽẹêềếểễệđìíỉĩịòóỏõọôồốổỗộơờớởỡợùúủũụưừứửữựỳýỷỹỵÀÁẢÃẠÂẦẤẨẪẬĂẰẮẲẴẶÈÉẺẼẸÊỀẾỂỄỆĐÌÍỈĨỊÒÓỎÕỌÔỒỐỔỖỘƠỜỚỞỠỢÙÚỦŨỤƯỪỨỬỮỰỲÝỶỸỴÂĂĐÔƠƯ";
NSString *decomposed = [unicodeCharacters decomposedStringWithCanonicalMapping];
NSLocale *usLocale = [[[NSLocale alloc] initWithLocaleIdentifier:@"en_US"] autorelease];
NSString *cleaned = [decomposed stringByFoldingWithOptions:NSDiacriticInsensitiveSearch locale:usLocale];
cleaned = [cleaned stringByReplacingOccurrencesOfString:@"đ" withString:@"d"];
cleaned = [cleaned stringByReplacingOccurrencesOfString:@"Đ" withString:@"D"];
NSLog (@"%@", cleaned);
[pool drain];
return 0;
}