note 129354 added to function.mb-substr

From: Date: Mon, 25 Mar 2024 10:17:05 +0000
Subject: note 129354 added to function.mb-substr
Groups: php.notes 
Request: Send a blank email to php-notes+get-221258@lists.php.net to get a copy of this message
Just wanted to add that not only the start can be a negative number, the length can be negative, too. And it works as expected. mb_substr( "1234567890", 3, -4, "UTF-8" ) => "456". So it cuts off the last 4 characters. ---- Server IP: 45.112.84.4 Probable Submitter: 80.90.13.131 (proxied: 49.250.4.231) ---- Manual Page -- https://php.net/manual/en/function.mb-substr.php Edit -- https://main.php.net/note/edit/129354 Del: integrated -- https://main.php.net/note/delete/129354/integrated Del: useless -- https://main.php.net/note/delete/129354/useless Del: bad code -- https://main.php.net/note/delete/129354/bad+code Del: spam -- https://main.php.net/note/delete/129354/spam Del: non-english -- https://main.php.net/note/delete/129354/non-english Del: in docs -- https://main.php.net/note/delete/129354/in+docs Del: other reasons-- https://main.php.net/note/delete/129354 Reject -- https://main.php.net/note/reject/129354 Search -- https://main.php.net/manage/user-notes.php

« previous php.notes (#221258) next »