Solidity で正確な文字列を 1 組の行に分割する: どれだけ骨が折れるでしょうか?
For the on-chain SVG generation of an NFT, I recently needed to split an (arbitrary) string into multiple lines. Each line should contain 40 characters. Pretty easy, right?Let’s assume that we use an external function which takes a string and returns a string[] array containing the individual lines. A straight-forward implementation looks like this: solidity…