#44606 [Opn->Fbk]: Error in description of second paramter for trim in german documentation
| From: | danbrown@php.net | Date: | Wed, 02 Apr 2008 14:41:57 +0000 |
| Subject: | #44606 [Opn->Fbk]: Error in description of second paramter for trim in german documentation | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-658@lists.php.net to get a copy of this message | ||
ID: 44606
Updated by: danbrown@php.net
Reported By: julian dot hartmann at gmail dot com
-Status: Open
+Status: Feedback
Bug Type: Translation problem
PHP Version: Irrelevant
New Comment:
My native language isn't German, but I do speak it. To me, the
combination of this:
"Die Funktion entfernt Whitespaces an Anfang und Ende von str und gibt
den String dann zurück. Ohne Verwendung des zweiten Parameters entfernt
trim() folgende Zeichen"
And this:
"Optional kann eine Liste weiterer Zeichen angefügt werden, die an
Anfang und Ende der Zeichenkette entfernt werden sollen. Um diese
Zeichen anzugeben, wird der charlist Parameter verwendet. Er enthält
eine Liste aller zu entfernenden Zeichen. Mit .. können darüber hinaus
auch ganze Bereiche von Zeichen angegeben werden."
Explains that the second parameter replaces the default charlist.
In addition, the English documentation does, in fact, state the same.
Previous Comments:
------------------------------------------------------------------------
[2008-04-02 10:03:36] julian dot hartmann at gmail dot com
Description:
------------
Error in description of second paramter for trim in german
documentation.
http://www.php.net/manual/de/function.trim.php
The second parameter (charlist) is explained as being a list of
ADDITIONAL characters to remove, but trim() seems to replace its default
list with this one instead of extending it.
English documentation does state not whether the second param "adds to"
or "replaces" the default.
Reproduce code:
---------------
$foo = " \xa0 bar";
$trimmed = trim($foo, "\xa0");
var_dump($trimmed);
$trimmed = trim($foo, "\xa0\x20");
var_dump($trimmed);
Expected result:
----------------
string(3) "bar"
string(3) "bar"
Actual result:
--------------
string(6) " bar"
string(3) "bar"
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=44606&edit=1