(PHP 8 >= 8.4.0)
mb_rtrim — Strip whitespace (or other characters) from the end of a string
   Performs a multi-byte safe rtrim() operation,
   and returns a string with whitespace (or other characters) stripped from the
   end of string.
  
Without the second parameter, mb_rtrim() will strip these characters:
" " (Unicode U+0020),普通空格。
     
    "\t" (Unicode U+0009),制表符。
     
    "\n"(Unicode U+000A),新行(换行)。
     
    "\r"(Unicode U+000D),回车。
     
    "\0"(Unicode U+0000),NUL 字节。
     
    "\v"(Unicode U+000B),垂直制表符。
     
    "\f"(Unicode U+000C),换页符。
     
    "\u00A0"(Unicode U+00A0),NO-BREAK SPACE。
     
    "\u1680"(Unicode U+1680),OGHAM SPACE MARK。
     
    "\u2000"(Unicode U+2000),EN QUAD。
     
    "\u2001"(Unicode U+2001),EM QUAD。
     
    "\u2002"(Unicode U+2002),EN SPACE。
     
    "\u2003"(Unicode U+2003),EM SPACE。
     
    "\u2004"(Unicode U+2004),THREE-PER-EM SPACE。
     
    "\u2005"(Unicode U+2005),FOUR-PER-EM SPACE。
     
    "\u2006"(Unicode U+2006),SIX-PER-EM SPACE。
     
    "\u2007"(Unicode U+2007),FIGURE SPACE。
     
    "\u2008"(Unicode U+2008),PUNCTUATION SPACE。
     
    "\u2009"(Unicode U+2009),THIN SPACE。
     
    "\u200A"(Unicode U+200A),HAIR SPACE。
     
    "\u2028"(Unicode U+2028),LINE SEPARATOR。
     
    "\u2029"(Unicode U+2029),PARAGRAPH SEPARATOR。
     
    "\u202F"(Unicode U+202F),NARROW NO-BREAK SPACE。
     
    "\u205F"(Unicode U+205F),MEDIUM MATHEMATICAL SPACE。
     
    "\u3000"(Unicode U+3000),IDEOGRAPHIC SPACE。
     
    "\u0085"(Unicode U+0085),NEXT LINE (NEL)。
     
    "\u180E"(Unicode U+180E),MONGOLIAN VOWEL SEPARATOR。
     
    stringcharacterscharacters
  参数指定要删除的字符。只需列出所有需要删除的字符即可。
 
    encodingencoding
参数为字符编码。如果省略或是 null,则使用内部字符编码。
Returns the modified string.
