Snippets

Oleg Chulakov Studio Telegram message entities

Created by Vlad
1
2
3
4
5
6
7
8
$parts = [];
$text = $message->getText();
arsort($splits, SORT_NUMERIC);
foreach ($splits as $split) {
    $parts[$split] = mb_substr($text, $split);
    $text = mb_substr($text, 0, $split);
}
ksort($parts);

Comments (0)

HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.