BBCodeParser 是用于解析 BBCode(论坛代码)的开源 Objective C 库。
要将此库用于您的项目,请将 BBCodeParser 文件夹中的文件复制到项目中。然后,在您需要解析代码的地方包含 "BBCodeParser.h" 文件。
使用示例
NSString *code = @""; // Your BB code here ...
BBCodeParser *parser = [[BBCodeParser alloc] initWithString:code];
for (BBElement *element in parser.elements)
{
// ...
}
要运行示例项目,请克隆仓库,并首先从 Example 目录运行 pod install
。
BBCodeParser 可通过 CocoaPods 获得。要安装它,只需在 Podfile 中添加以下行
pod "BBCodeParser"
Miha Rataj,[email protected]
BBCodeParser 在 MIT 许可协议下可用。更多信息请查看 LICENSE 文件。