GTMNSStringHTMLAdditions 0.2.1

GTMNSStringHTMLAdditions 0.2.1

测试测试
Lang语言 Obj-CObjective C
许可证 自定义
发布上次发布2015年10月

Greg JGregory Jeckell维护。



  • 作者
  • Gregory Jeckell

Google Toolbox for Mac字符串分类

用法

要运行示例项目,首先复制仓库,然后从示例目录运行pod install

要在项目中使用,只需导入/包含包并按以下方式开始:

Objective-C

NSString* raw_html_string = @"Here's a raw html string you'll want to escape. 10 > 4 && 6 < 8.";
NSString* unescaped_string = [raw_html_string gtm_stringByUnescapingFromHTML];
NSLog(@"%@", unescaped_string); // Here's a raw html string you'll want to escape. 10 > 4 && 6 < 8.

Swift

let raw_html_string = "Here&apos;s a raw html string you&apos;ll want to escape. 10 &gt; 4 &amp;&amp; 6 &lt; 8."
let unescaped_string = raw_html_string.gtm_stringByUnescapingFromHTML()
println(unescaped_string) // Here's a raw html string you'll want to escape. 10 > 4 && 6 < 8.

安装

GTMNSStringHTMLAdditions通过CocoaPods提供。要安装它,只需将以下行添加到Podfile中:

pod "GTMNSStringHTMLAdditions"

作者

Google

许可证

GTMNSStringHTMLAdditions在Apache许可证下提供。有关更多信息,请参阅LICENSE文件。