str_pad() proposed changes

From: Date: Fri, 07 Jul 2000 20:26:02 +0000
Subject: str_pad() proposed changes
Groups: php.general 
Request: Send a blank email to php-general+get-5447@lists.php.net to get a copy of this message
How many people use str_pad() function? I realized that currently it only pads on the left or on the right. I'd like to enhance it to be able to pad on both sides as well. It would look something like: $string = str_pad($string, 10, STR_PAD_RIGHT); $string = str_pad($string, 10, STR_PAD_LEFT); $string = str_pad($string, 10, STR_PAD_BOTH); Unfortunately, it's incompatible with the current version which looks like: $string = str_pad($string, 10); $string = str_pad($string, -10); So, that's why I wanted to know if I can go ahead and break it. The function isn't even documented yet.. -Andrei The Heineken Uncertainty Principle: You can never be sure how many beers you had last night.

« previous php.general (#5447) next »