An open API service indexing awesome lists of open source software.

https://github.com/nextfaze/characterentityconverter

Objective C library for character entity conversions
https://github.com/nextfaze/characterentityconverter

Last synced: 8 months ago
JSON representation

Objective C library for character entity conversions

Awesome Lists containing this project

README

          

# CharacterEntityConverter

CharacterEntityConverter - Objective C library for character entity conversions

## Installation

> git clone git://github.com/NextfazeSD/CharacterEntityConverter.git

## Interfaces

CharacterEntityConverter:

+ (NSString *)decodeEntities:(NSString *)string;
+ (NSString *)decodeEntitiesForXML:(NSString *)string;
+ (NSString *)encodeEntities:(NSString *)string;
+ (NSString *)encodeEntitiesForXML:(NSString *)string;
+ (NSString *)encodeEntities:(NSString *)string fromCodePoint:(unsigned int)fromCodePoint html:(BOOL)html;

NSString+CharacterEntityConverter: (NSString category)

- (NSString *)stringByEncodingEntities;
- (NSString *)stringByEncodingEntitiesForXML;
- (NSString *)stringByDecodingEntities;
- (NSString *)stringByDecodingEntitiesForXML;

NSMutableString+CharacterEntityConverter: (NSMutableString category)

- (void)encodeEntities;
- (void)encodeEntitiesForXML;
- (void)decodeEntities;
- (void)decodeEntitiesForXML;

## Synopsis

decoding character entities

#import "NSString+CharacterEntityConverter.h"

[@"foo & bar" stringByDecodingEntities]; // -> "foo & bar"
[@"foo & ™" stringByDecodingEntitiesForXML]; // -> "foo & bar ™" (™ is not valid in XML)

encoding character entities

#import "NSString+CharacterEntityConverter.h"

[@"foo & bar" stringByEncodingEntities]; // -> "foo & bar"
[@"foo & bar ™" stringByEncodingEntitiesForXML]; // -> "foo & bar ™" (™ is not valid in XML)

## License

CharacterEntityConverter is licensed under the terms of the [Apache License, version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html). Please see the [LICENSE](https://github.com/NextfazeSD/CharacterEntityConverter/blob/master/LICENSE) file for full details.

## Credits

CharacterEntityConverter is brought to you by [Andrew Williams](http://github.com/sobakasu) and supported by the [NextFaze](http://www.nextfaze.com) team and the GitHub community.