rtrim
rtrim — Strip whitespace (or other characters) from the end of a string.Description
rtrim( string $string,This function returns a string with whitespace (or other characters) stripped from the end of string.
string $characters = " \n\r\t\v\0" ): string
Without the second parameter, rtrim() will strip these characters:
• " " (ASCII 32 (0x20)), an ordinary space.
• "\t" (ASCII 9 (0x09)), a tab.
• "\n" (ASCII 10 (0x0A)), a new line (line feed).
• "\r" (ASCII 13 (0x0D)), a carriage return.
• "\0" (ASCII 0 (0x00)), the NUL-byte.
• "\v" (ASCII 11 (0x0B)), a vertical tab.
Parameters
string
The string that will be trimmed.
characters
Optionally, the stripped characters can also be specified using the characters parameter. Simply list all characters that you want to be stripped. With .. you can specify a range of characters.
Return Values
Returns the modified string.More information about rtrim on official PHP documentation site
rtrim - Popular snippets
- PHP 8.0 / MySQL 5.7 rtrim
last run:
2021-12-17 09:55:31
2
- PHP 8.0 / MySQL 5.7 rtrim rtrim
last run:
2021-12-17 09:55:05
2
- PHP 8.0 / MySQL 8.0 mysqli_query rtrim array_push print_r count
last run:
2021-08-15 17:03:48
2
- PHP 8.0 / MySQL 8.0 mysqli_query rtrim array_push print_r count
last run:
2021-08-15 16:55:01
2
- PHP 7 / MySQL 5.7 rtrim
last run:
2021-12-17 09:55:29
1
- PHP 5 / MySQL 5.7 rtrim
last run:
2021-12-17 09:55:27
1
- PHP 8.0 / MySQL 5.7 rtrim
last run:
2021-12-17 09:55:00
1
- PHP 8.0 / MySQL 5.7 strpos strrpos strlen substr rtrim var_dump
last run:
2021-09-17 15:18:10
1
- PHP 8.0 / MySQL 5.7 strpos strrpos strlen substr rtrim var_dump
last run:
2021-09-17 15:18:05
1
rtrim - New snippets
-
PHP 7 / MySQL 5.7 rtrim
added at:
2021-12-17 09:55:29
1
-
PHP 5 / MySQL 5.7 rtrim
added at:
2021-12-17 09:55:27
1
-
PHP 8.0 / MySQL 5.7 rtrim
added at:
2021-12-17 09:55:13
2
-
PHP 8.0 / MySQL 5.7 rtrim
added at:
2021-12-17 09:55:00
1
-
PHP 8.0 / MySQL 5.7 rtrim rtrim
added at:
2021-12-17 09:54:52
2
-
PHP 8.0 / MySQL 5.7 strpos strrpos strlen substr rtrim var_dump
added at:
2021-09-17 15:18:10
1
-
PHP 8.0 / MySQL 5.7 strpos strrpos strlen substr rtrim var_dump
added at:
2021-09-17 15:18:05
1
-
PHP 8.0 / MySQL 5.7 strpos substr rtrim var_dump
added at:
2021-09-17 15:07:07
1
-
PHP 8.0 / MySQL 5.7 strpos substr strlen rtrim var_dump
added at:
2021-09-17 15:06:42
1