Latest 2.0
Homepage https://github.com/Insfgg99x/FGReverser
License MIT
Platforms ios 6.0, requires ARC
Authors

Introduction

A Category of NSString used for mutual converting between simplified Chinese and Traditional Chinese.

Installtion

  • Manual:
    Download This Project and drag the FGReverser folder into your peroject, do not forget to ensure "copy item if need" being selected.

  • Cocoapods:
    pod 'FGReverser', '~> 2.0'

Usage

Just import the header file:import "NSString+FGReverser.h"

Simplfied Chinese to Traditional Chinese, or Traditional Chinese to Simplfied Chinese, Use:

-(NSString *)reverseString;

Example

NSString *[email protected]"恭喜发财";
NSString *reslutString=[sourceString fg_reversed];
NSLog(@"%@",reslutString);

The result is 恭喜發財

NSString *[email protected]"恭喜發財";
NSString *reslutString=[sourceString fg_reversed];
NSLog(@"%@",reslutString);

The result is 恭喜发财

Use in Swift

import UIKit
import FGReverser

class ViewController: UIViewController {
    override func viewDidLoad() {
        super.viewDidLoad()
        var str = "恭喜发财"
        str = str.fg_reversed()!
        print(str)
        str = str.fg_reversed()!
        print(str)
    }
}

result is:

恭喜發財
恭喜发财

About Me


@CGPoitZero

Latest podspec

{
    "name": "FGReverser",
    "version": "2.0",
    "summary": "FGReverser is a Category of NSString used for mutual converting between simplified Chinese and Traditional Chinese.",
    "homepage": "https://github.com/Insfgg99x/FGReverser",
    "license": "MIT",
    "authors": {
        "CGPointZero": "[email protected]"
    },
    "source": {
        "git": "https://github.com/Insfgg99x/FGReverser.git",
        "tag": "2.0"
    },
    "platforms": {
        "ios": "6.0"
    },
    "source_files": "Reverser/*.{h,m}",
    "requires_arc": true
}

Pin It on Pinterest

Share This