Last active 3 months ago
Javascript
0
0
1
| 1 | function encodeTextWithIcons(text) { |
| 2 | // Split text by icon pattern {number} |
| 3 | const parts = text.split(/(\{\d+\})/g); |
| 4 | |
| 5 | const byteArray = []; |
| 6 | |
| 7 | for (const part of parts) { |
| 8 | if (part === '') continue; |
| 9 | |
| 10 | // Check if it's an icon pattern |