mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-06-26 04:43:49 +02:00
[Gab] feat: add new bridge GabBridge (#2920)
This commit is contained in:
@ -50,6 +50,15 @@ function raw(string $s): string
|
||||
return $s;
|
||||
}
|
||||
|
||||
function truncate(string $s, int $length = 150, $marker = '...'): string
|
||||
{
|
||||
$s = trim($s);
|
||||
if (mb_strlen($s) <= $length) {
|
||||
return $s;
|
||||
}
|
||||
return mb_substr($s, 0, $length) . $marker;
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes unwanted tags from a given HTML text.
|
||||
*
|
||||
|
Reference in New Issue
Block a user