美文网首页
iOS货币简写与货币符号转换

iOS货币简写与货币符号转换

作者: Miridescent | 来源:发表于2017-09-21 14:14 被阅读512次

开发中会用到货币的简写和货币符号转换的情况,下面是一个人的一个总结,输入的是每个国家的货币三位英文缩写,输出的是货币的符号表示

- (NSString *)moneyTagWithMoneyCode:(NSString *)moneyCode{
    
    NSString *moneyTag = moneyCode;
    
    // 亚洲
    if ([moneyCode isEqualToString:@"HKD"]) moneyTag = @"HK$";
    if ([moneyCode isEqualToString:@"MOP"]) moneyTag = @"PAT";
    if ([moneyCode isEqualToString:@"CNY"]) moneyTag = @"¥";
    if ([moneyCode isEqualToString:@"YND"]) moneyTag = @"D";
    if ([moneyCode isEqualToString:@"JPY"]) moneyTag = @"J¥";
    if ([moneyCode isEqualToString:@"LAK"]) moneyTag = @"K";
    if ([moneyCode isEqualToString:@"KHR"]) moneyTag = @"CR";
    if ([moneyCode isEqualToString:@"PHP"]) moneyTag = @"P";
    if ([moneyCode isEqualToString:@"MYR"]) moneyTag = @"M$";
    if ([moneyCode isEqualToString:@"SGD"]) moneyTag = @"S$";
    if ([moneyCode isEqualToString:@"THP"]) moneyTag = @"BT$";
    if ([moneyCode isEqualToString:@"BUK"]) moneyTag = @"K";
    if ([moneyCode isEqualToString:@"LKR"]) moneyTag = @"S.Re";
    if ([moneyCode isEqualToString:@"MVR"]) moneyTag = @"M.R.R";
    if ([moneyCode isEqualToString:@"IDR"]) moneyTag = @"Rps";
    if ([moneyCode isEqualToString:@"PRK"]) moneyTag = @"Pak.Re";
    if ([moneyCode isEqualToString:@"INR"]) moneyTag = @"Re";
    if ([moneyCode isEqualToString:@"NPR"]) moneyTag = @"N.Re";
    if ([moneyCode isEqualToString:@"AFA"]) moneyTag = @"Af";
    if ([moneyCode isEqualToString:@"IRR"]) moneyTag = @"RI";
    if ([moneyCode isEqualToString:@"IQD"]) moneyTag = @"ID";
    if ([moneyCode isEqualToString:@"SYP"]) moneyTag = @"£.S";
    if ([moneyCode isEqualToString:@"LBP"]) moneyTag = @"£L";
    if ([moneyCode isEqualToString:@"JOD"]) moneyTag = @"J.D";
    if ([moneyCode isEqualToString:@"SAR"]) moneyTag = @"S.A.RIs";
    if ([moneyCode isEqualToString:@"KWD"]) moneyTag = @"K.D";
    if ([moneyCode isEqualToString:@"BHD"]) moneyTag = @"BD";
    if ([moneyCode isEqualToString:@"QAR"]) moneyTag = @"QR";
    if ([moneyCode isEqualToString:@"OMR"]) moneyTag = @"RO";
    if ([moneyCode isEqualToString:@"YER"]) moneyTag = @"YRL";
    if ([moneyCode isEqualToString:@"YDD"]) moneyTag = @"YD";
    if ([moneyCode isEqualToString:@"TRL"]) moneyTag = @"£T";
    if ([moneyCode isEqualToString:@"CYP"]) moneyTag = @"£C";
    
    // 大洋洲
    if ([moneyCode isEqualToString:@"AUD"]) moneyTag = @"$A";
    if ([moneyCode isEqualToString:@"NZD"]) moneyTag = @"$NZ";
    if ([moneyCode isEqualToString:@"FJD"]) moneyTag = @"F.$";
    if ([moneyCode isEqualToString:@"SBD"]) moneyTag = @"SL.$";
    
    // 欧洲
    if ([moneyCode isEqualToString:@"EUR"]) moneyTag = @"EUR";
    if ([moneyCode isEqualToString:@"ISK"]) moneyTag = @"I.Kr";
    if ([moneyCode isEqualToString:@"DKK"]) moneyTag = @"D.Kr";
    if ([moneyCode isEqualToString:@"NOK"]) moneyTag = @"N.Kr";
    if ([moneyCode isEqualToString:@"SEK"]) moneyTag = @"S.Kr";
    if ([moneyCode isEqualToString:@"FIM"]) moneyTag = @"FMK";
    if ([moneyCode isEqualToString:@"SUR"]) moneyTag = @"Rbs";
    if ([moneyCode isEqualToString:@"PLZ"]) moneyTag = @"ZL";
    if ([moneyCode isEqualToString:@"CSK"]) moneyTag = @"Kcs";
    if ([moneyCode isEqualToString:@"HUF"]) moneyTag = @"FT";
    if ([moneyCode isEqualToString:@"DEM"]) moneyTag = @"DM";
    if ([moneyCode isEqualToString:@"ATS"]) moneyTag = @"ScH";
    if ([moneyCode isEqualToString:@"CHF"]) moneyTag = @"SF";
    if ([moneyCode isEqualToString:@"NLG"]) moneyTag = @"Gs";
    if ([moneyCode isEqualToString:@"BEF"]) moneyTag = @"Bi";
    if ([moneyCode isEqualToString:@"LUF"]) moneyTag = @"Lux.F";
    if ([moneyCode isEqualToString:@"GBP"]) moneyTag = @"£";
    if ([moneyCode isEqualToString:@"IEP"]) moneyTag = @"£.Ir";
    if ([moneyCode isEqualToString:@"FRF"]) moneyTag = @"F.F";
    if ([moneyCode isEqualToString:@"ESP"]) moneyTag = @"Pts";
    if ([moneyCode isEqualToString:@"PTE"]) moneyTag = @"ESC";
    if ([moneyCode isEqualToString:@"ITL"]) moneyTag = @"Lit";
    if ([moneyCode isEqualToString:@"MTP"]) moneyTag = @"£.M";
    if ([moneyCode isEqualToString:@"ROL"]) moneyTag = @"L";
    if ([moneyCode isEqualToString:@"BGL"]) moneyTag = @"Lev";
    if ([moneyCode isEqualToString:@"ALL"]) moneyTag = @"Af";
    if ([moneyCode isEqualToString:@"GRD"]) moneyTag = @"Dr";
    
    // 美洲
    if ([moneyCode isEqualToString:@"CAD"]) moneyTag = @"Can.$";
    if ([moneyCode isEqualToString:@"USD"]) moneyTag = @"U.S.$";
    if ([moneyCode isEqualToString:@"MXP"]) moneyTag = @"Mex.$";
    if ([moneyCode isEqualToString:@"GTQ"]) moneyTag = @"Q";
    if ([moneyCode isEqualToString:@"SVC"]) moneyTag = @"¢";
    if ([moneyCode isEqualToString:@"HNL"]) moneyTag = @"L";
    if ([moneyCode isEqualToString:@"NIC"]) moneyTag = @"CS";
    if ([moneyCode isEqualToString:@"CRC"]) moneyTag = @"¢";
    if ([moneyCode isEqualToString:@"PAB"]) moneyTag = @"B";
    if ([moneyCode isEqualToString:@"CUP"]) moneyTag = @"Cu.Pes";
    if ([moneyCode isEqualToString:@"BSD"]) moneyTag = @"B.$";
    if ([moneyCode isEqualToString:@"JMD"]) moneyTag = @"$.J";
    if ([moneyCode isEqualToString:@"HTG"]) moneyTag = @"G";
    if ([moneyCode isEqualToString:@"DOP"]) moneyTag = @"R.D.$";
    if ([moneyCode isEqualToString:@"TTD"]) moneyTag = @"T.T.$";
    if ([moneyCode isEqualToString:@"BBD"]) moneyTag = @"BDS.$";
    if ([moneyCode isEqualToString:@"COP"]) moneyTag = @"Col.$";
    if ([moneyCode isEqualToString:@"VEB"]) moneyTag = @"B";
    if ([moneyCode isEqualToString:@"GYD"]) moneyTag = @"G.$";
    if ([moneyCode isEqualToString:@"SRG"]) moneyTag = @"S.FI";
    if ([moneyCode isEqualToString:@"PES"]) moneyTag = @"S/";
    if ([moneyCode isEqualToString:@"ECS"]) moneyTag = @"S/";
    if ([moneyCode isEqualToString:@"BRC"]) moneyTag = @"Gr.$";
    if ([moneyCode isEqualToString:@"BOP"]) moneyTag = @"NBol.P";
    if ([moneyCode isEqualToString:@"CLP"]) moneyTag = @"P";
    if ([moneyCode isEqualToString:@"ARP"]) moneyTag = @"Arg.P";
    if ([moneyCode isEqualToString:@"PVG"]) moneyTag = @"Guars";
    if ([moneyCode isEqualToString:@"UYP"]) moneyTag = @"N.$";
    
    // 非洲
    if ([moneyCode isEqualToString:@"EGP"]) moneyTag = @"£E";
    if ([moneyCode isEqualToString:@"LYD"]) moneyTag = @"LD";
    if ([moneyCode isEqualToString:@"SDP"]) moneyTag = @"£S";
    if ([moneyCode isEqualToString:@"TND"]) moneyTag = @"TD";
    if ([moneyCode isEqualToString:@"DZD"]) moneyTag = @"AD";
    if ([moneyCode isEqualToString:@"MAD"]) moneyTag = @"DH";
    if ([moneyCode isEqualToString:@"MRO"]) moneyTag = @"UM";
    if ([moneyCode isEqualToString:@"XOF"]) moneyTag = @"C.F.A.F";
    if ([moneyCode isEqualToString:@"GMD"]) moneyTag = @"D.G";
    if ([moneyCode isEqualToString:@"GWP"]) moneyTag = @"PG";
    if ([moneyCode isEqualToString:@"GNS"]) moneyTag = @"GS";
    if ([moneyCode isEqualToString:@"SLL"]) moneyTag = @"Le";
    if ([moneyCode isEqualToString:@"LRD"]) moneyTag = @"Lib.$";
    if ([moneyCode isEqualToString:@"GHC"]) moneyTag = @"¢";
    if ([moneyCode isEqualToString:@"NGN"]) moneyTag = @"N";
    if ([moneyCode isEqualToString:@"XAF"]) moneyTag = @"CFAF";
    if ([moneyCode isEqualToString:@"GQE"]) moneyTag = @"EK";
    if ([moneyCode isEqualToString:@"ZAR"]) moneyTag = @"R";
    if ([moneyCode isEqualToString:@"DJF"]) moneyTag = @"DJ.FS";
    if ([moneyCode isEqualToString:@"SOS"]) moneyTag = @"Sh.So";
    if ([moneyCode isEqualToString:@"KES"]) moneyTag = @"K.Sh";
    if ([moneyCode isEqualToString:@"UGS"]) moneyTag = @"U.Sh";
    if ([moneyCode isEqualToString:@"TZS"]) moneyTag = @"T.Sh";
    if ([moneyCode isEqualToString:@"RWF"]) moneyTag = @"RF";
    if ([moneyCode isEqualToString:@"BIF"]) moneyTag = @"F.Bu";
    if ([moneyCode isEqualToString:@"ZRZ"]) moneyTag = @"Z";
    if ([moneyCode isEqualToString:@"ZMK"]) moneyTag = @"KW";
    if ([moneyCode isEqualToString:@"MCF"]) moneyTag = @"F.Mg";
    if ([moneyCode isEqualToString:@"SCR"]) moneyTag = @"S.RP(S)";
    if ([moneyCode isEqualToString:@"MUR"]) moneyTag = @"Maur.Rp";
    if ([moneyCode isEqualToString:@"ZWD"]) moneyTag = @"FZIM.$";
    if ([moneyCode isEqualToString:@"KMF"]) moneyTag = @"Com.F";
    
    
    return moneyTag;
}

总结辛苦,记得点赞☺

相关文章

  • iOS货币简写与货币符号转换

    开发中会用到货币的简写和货币符号转换的情况,下面是一个人的一个总结,输入的是每个国家的货币三位英文缩写,输出的是货...

  • 【上岛说币】- LTC

    莱特币Litecoin(简写:LTC,货币符号:Ł)是一种基于"点对点"(peer-to-peer)技术的网络货币...

  • 莱特币的前世今生

    莱特币(英语:Litecoin,简写:LTC,货币符号:Ł,字义:精简币)是一种点对点的电子加密货币,也是MIT/...

  • HBC影子黄金币白皮书简历

    一、HBC发起背景 HBC英文全称为Hand Block Chain,简写为HBC,货币符号,这是一种虚拟的加密数...

  • HBC影子黄金币白皮书简历

    一、HBC发起背景 HBC英文全称为Hand Block Chain,简写为HBC,货币符号,这是一种虚拟的加密数...

  • NSLocale

    国家编码语言编码货币符号货币编码 =============currentLocale==============...

  • 墨西哥

    www.wordreference.com 货币:墨西哥比索PESO (货币代码:MXN,货币符号Mex.$) 国...

  • vue filter示例

    货币转换 日期转换

  • 《锋哥论道区块链》之四区块链1.0之比特币--货币系统发展

    货币系统发展:(1)以物易物(2)实物货币:如黄金作为实物货币(3)符号货币:如纸币(4)中央系统虚拟货币:(5)...

  • 挖矿是如何产生比特币的?

    什么是比特币? 比特币(英语:Bitcoin,简写:BTC,货币符号:฿),是一种用开源的 P2P 技术的软件而产...

网友评论

      本文标题:iOS货币简写与货币符号转换

      本文链接:https://www.haomeiwen.com/subject/ebizsxtx.html