我正在尝试从string
using中删除最后几个字符rtrim
。
我有字符串"Scryed (download torrent) - TPB"
我想要输出字符串"Scryed"
例如
$title_t = "Scryed (download torrent) - TPB";
echo ($title_t) ;
echo "\n";
$title = ( rtrim ($title_t, "(download torrent) - TPB") );
echo ($title) ;
给
Scryed (download torrent) - TPB
Scry
这是为什么 ?预期输出是
Scryed (download torrent) - TPB
Scryed