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
Return Values
Returns the modified string.More information about rtrim on official PHP documentation site
rtrim - Popular snippets
- PHP 8.1 / array_count_values str_repeat rtrim
last run:
2023-08-27 08:06:40
15
- PHP 8.1 / file_exists file_get_contents preg_match_all parse_url rtrim
last run:
2022-07-12 14:01:54
10
- PHP 8.1 / MySQL 8.0 rtrim str_repeat count var_export
last run:
2025-03-12 00:10:44
10
- PHP 8.1 / array_count_values str_repeat rtrim
last run:
2023-08-27 15:22:28
9
- PHP 8.1 / array_count_values str_repeat rtrim
last run:
2023-08-27 07:59:14
8
- PHP 8.1 / MySQL 8.0 array_chunk date strtotime rtrim
last run:
2024-02-01 17:49:43
5
- PHP 8.1 / MySQL 8.0 array_chunk rtrim
last run:
2024-02-01 17:48:56
5
- PHP 8.1 / preg_match rtrim implode
last run:
2024-07-23 19:01:28
4
- PHP 8.1 / array_count_values str_repeat rtrim
last run:
2023-08-27 09:03:55
3
- PHP 8.1 / count rtrim
last run:
2022-09-15 05:55:37
3
rtrim - New snippets
-
PHP 7.4 / MariaDB 11.4 explode trim count rtrim substr json_decode
added at:
2025-02-13 17:38:00
1
-
PHP 8.1 / gettype str_replace rtrim
added at:
2025-01-09 13:13:23
1
-
PHP 8.1 / strtolower strlen ord rtrim
added at:
2024-12-27 16:48:54
1
-
PHP 8.1 / strtolower strlen ord rtrim
added at:
2024-12-27 16:48:18
1
-
PHP 8.1 / MySQL 8.0 rtrim md5 base64_decode
added at:
2024-12-21 11:09:47
1
-
PHP 8.1 / MySQL 8.0 base64_encode md5 rtrim base64_decode
added at:
2024-12-21 11:08:31
2
-
PHP 8.1 / MySQL 8.0 rtrim strtr base64_encode json_encode hash_hmac
added at:
2024-12-06 09:58:04
1
-
PHP 8.2 / MariaDB 11.4 max strlen str_repeat str_pad rtrim
added at:
2024-12-03 11:38:58
1
-
PHP 8.2 / MariaDB 11.4 max strlen str_repeat str_pad rtrim
added at:
2024-12-03 11:38:38
1
-
PHP 8.2 / MariaDB 11.4 max strlen str_repeat str_pad rtrim
added at:
2024-12-03 11:38:33
1