Divide Post content into separate divs for every 500 characters (or any other character counts)

What is the best method for intercepting the_content of a post (for a single post page) and dividing the_content into sections of 500 characters (or any other number of characters), and then outputting each 500-character section wrapped in its own div container? I understand that get_the_content() will return the post content as a string that … Read more

Split large string in n-size chunks in JavaScript

I would like to split a very large string (let’s say, 10,000 characters) into N-size chunks. What would be the best way in terms of performance to do this? For instance: “1234567890” split by 2 would become [“12”, “34”, “56”, “78”, “90”]. Would something like this be possible using String.prototype.match and if so, would that … Read more

Turning a Comma Separated string into individual rows

I have a SQL Table like this: | SomeID | OtherID | Data +—————-+————-+——————- | abcdef-….. | cdef123-… | 18,20,22 | abcdef-….. | 4554a24-… | 17,19 | 987654-….. | 12324a2-… | 13,19,20 is there a query where I can perform a query like SELECT OtherID, SplitData WHERE SomeID = ‘abcdef-…….’ that returns individual rows, like … Read more