php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #20930 [DE] Description of string functions
Submitted: 2002-12-11 00:14 UTC Modified: 2009-04-24 06:21 UTC
Votes:3
Avg. Score:1.7 ± 0.9
Reproduced:0 of 1 (0.0%)
From: rc at opelgt dot org Assigned: wiesemann (profile)
Status: Closed Package: Translation problem
PHP Version: Irrelevant OS: *
Private report: No CVE-ID: None
 [2002-12-11 00:14 UTC] rc at opelgt dot org
The short descriptions of the following string functions could be more precisely at least in german:

strpos - Position des ersten Vorkommens des Suchstrings
strrpos - Position des letzten Vorkommens des Suchbuchstabens
strstr - Reststring ab erstem Vorkommen des Suchstrings
stristr - Reststring ab erstem Vorkommen(insensitiv) des Suchstrings
strchr - Reststring ab erstem Vorkommen des Suchbuchstabens
strrchr - Reststring ab letztem Vorkommen des Suchbuchstabens

or if "find" is the keyword:

strpos - Findet erstes Vorkommen des Suchstrings, liefert Position
strrpos - Findet letztes Vorkommen des Suchbuchstabens, liefert Position
strstr - Findet erstes Vorkommen des Suchstrings, liefert Reststring
stristr - Findet erstes Vorkommen(insensitiv) des Suchstrings, liefert Reststring
strchr - Findet erstes Vorkommen des Suchbuchstabens, liefert Reststring
strrchr - Findet letztes Vorkommen des Suchbuchstabens, liefert Reststring

With kind regards,
R?diger

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-01-04 05:12 UTC] wiesemann@php.net
I will fix it (in german manual).
English version doesn't need to be changed.
 [2003-01-04 07:33 UTC] wiesemann@php.net
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.


 [2007-02-04 10:55 UTC] rc at opelgt dot org
The german descriptions of this similar functions again 
could be more precise.

Here is my suggestion:
strchr - alias von strstr
stripos - Sucht erstes Vorkommen eines Strings, liefert 
Position, unabh?ngig von Gro?- und Kleinschreibung
stristr - wie strstr, aber unabh?ngig von Gro?- und 
Kleinschreibung
strpbrk - Sucht erstes Vorkommen eines Zeichens von 
mehreren, liefert Reststring
strpos - Sucht erstes Vorkommen eines Strings, liefert 
Position
strrchr - Sucht letztes Vorkommen eines Zeichens, liefert 
Reststring
strripos - Sucht letztes Vorkommen eines Strings, liefert 
Position, unabh?ngig von Gro?- und Kleinschreibung
strrpos - Sucht letztes Vorkommen eines Strings, liefert 
Position
strstr - Sucht erstes Vorkommen eines Strings, liefert 
Reststring

With kind regards,
R?diger
 [2009-04-23 19:25 UTC] wiesemann@php.net
All German descriptions were already in sync with the English descriptions. IMHO adding additional descriptions make only sense if also the English descriptions would be changed.

I've reworded the description of stristr() with a more common term.


 [2009-04-23 19:49 UTC] rc at opelgt dot org
You are right: when the english descriptions would be changed it would 
be better.

I think its good, when the description tells what the function returns.
Then its not necessary to click one page deeper to the long description.

Warum auf eine gute kurze Beschreibung verzichten? ;-)

R?diger
 [2009-04-23 20:14 UTC] sammywg@php.net
The German translation is only a translation, not a new written manual version. So yes, some function's return is simple to explain but also there are lots of functions with more complicated return values.

We try to keep the manual as consistently as possible. Because of that all functions have the standard result type in its signature on the head of their pages and also they have a documentation section with explained return types. 

So the question why not to write the complete result options in the function summary is easily answered: It is not possible to do that in all cases but in most cases the return value is implicitely described in the short description. (e.g. strpos - Find position of first occurrence of a string, that means an integer value of the first occurrence of the search string is returned by default.)
 [2009-04-23 23:14 UTC] rc at opelgt dot org
I am not asking for all options.
I am asking for a consistent short description text
that is no longer than the text now but more precise.

Maybe you are not familiar with german.

These functions are used often. So it would be nice when the short text 
gives the return value of the function.

Let me explain it:
strstr ? Find first occurrence of a string
First occurrence means the position. But in fact it delivers the part of 
the string haystack from the occurrence up to the end.
 [2009-04-24 06:21 UTC] wiesemann@php.net
R?diger, both sammywg and I are native German speakers.

The manual needs to find a comprise between a short and a precise description. In addition, the translations need to stay in sync with the English manual.

If you want to propose changes to the short descriptions, please open bug reports for the English manual. Changes made there will be synced to all translations, including the German one, i.e. all versions of the manual could benefit from your suggestions then.
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Thu Jan 23 06:01:24 2020 UTC