note 116164 added to function.str-pad

From: Date: Mon, 17 Nov 2014 15:45:43 +0000
Subject: note 116164 added to function.str-pad
Groups: php.notes 
Request: Send a blank email to php-notes+get-200928@lists.php.net to get a copy of this message
since the default pad_type is STR_PAD_RIGHT. using STR_PAD_BOTH were always favor in the right pad if the required number of padding characters can't be evenly divided. e.g <?php echo str_pad("input", 10, "pp", STR_PAD_BOTH ); // ppinputppp echo str_pad("input", 6, "p", STR_PAD_BOTH ); // inputp echo str_pad("input", 8, "p", STR_PAD_BOTH ); //pinputpp ?> ---- Server IP: 72.52.91.14 Probable Submitter: 112.205.232.205 ---- Manual Page -- http://php.net/manual/en/function.str-pad.php Edit -- https://master.php.net/note/edit/116164 Del: integrated -- https://master.php.net/note/delete/116164/integrated Del: useless -- https://master.php.net/note/delete/116164/useless Del: bad code -- https://master.php.net/note/delete/116164/bad+code Del: spam -- https://master.php.net/note/delete/116164/spam Del: non-english -- https://master.php.net/note/delete/116164/non-english Del: in docs -- https://master.php.net/note/delete/116164/in+docs Del: other reasons-- https://master.php.net/note/delete/116164 Reject -- https://master.php.net/note/reject/116164 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#200928) next »