mrataj / bbcodeparser Goto Github PK
View Code? Open in Web Editor NEWBBCode (BulletinBoard code) parser for Objective-C.
License: MIT License
BBCode (BulletinBoard code) parser for Objective-C.
License: MIT License
Hi. Thanks for sharing this library. I'm loving it right now.
I want to find the original range of an element. That is - where the element that was parsed was found in the original piece of text.
Say you have this:
NSString *string = @"AND I NEVER THOUGHT [quote author=iffets12345 game=iffets12345 ]Haha, EXACTLY![/quote]";
You parse it with the parser and it returns an element.
Now I want to replace the original location of the element with some new text based on what I have parsed out of the element.
Can this library do anything like that?
Basically - I want to turn that original string into something like this:
AND I NEVER THOUGHT "Haha, EXACTLY!" - iffets12345.
I noticed that you're iterating over every single character of the code string, and subsequently appending each new character to its corresponding element. This uses a huge amount of memory and will actually crash the app if the string is too long. Have you considered refactoring your code to use more appropriate methods, like rangeOfCharacterFromSet:
, etc?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.