From d72284c6dfd09d2b619d8107347a614b697cce9a Mon Sep 17 00:00:00 2001 From: Philip Olson Date: Fri, 4 Jul 2003 23:13:02 +0000 Subject: [PATCH] Added example to reflect #21318, and minor changes. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@134203 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/strings/functions/str-pad.xml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/reference/strings/functions/str-pad.xml b/reference/strings/functions/str-pad.xml index 4acd1776b8..093c7b2ea4 100644 --- a/reference/strings/functions/str-pad.xml +++ b/reference/strings/functions/str-pad.xml @@ -1,5 +1,5 @@ - + @@ -46,6 +46,7 @@ $input = "Alien"; print str_pad($input, 10); // produces "Alien " print str_pad($input, 10, "-=", STR_PAD_LEFT); // produces "-=-=-Alien" print str_pad($input, 10, "_", STR_PAD_BOTH); // produces "__Alien___" +print str_pad($input, 6 , "___"); // produces "Alien_" ?> ]]> @@ -54,8 +55,8 @@ print str_pad($input, 10, "_", STR_PAD_BOTH); // produces "__Alien___" The pad_string may be truncated if the - required number of padding characters can't be evenly diveded by - the padding strings length. + required number of padding characters can't be evenly divided by + the pad_string's length.