Mention "trim" as a common name for removing space#95
Mention "trim" as a common name for removing space#95afresh1 wants to merge 1 commit intoperl-doc-cats:masterfrom
Conversation
As discussed on perl5-porters, folks looking for this entry may not find it if they are coming from another language where this is commonly called "trim".
|
My only concern with changing question titles is that it breaks deep-links to the question. I think this question might be one where those exist. But |
|
Unfortunately my other suggestion, add a second heading so existing deeplinks keep working, is not something that |
|
Would adding an X<> reference with the old title make it work on perldoc.org or the metacpan? |
|
No, |
| production for years. | ||
|
|
||
| =head2 How do I strip blank space from the beginning/end of a string? | ||
| =head2 How do I trim a string to strip blank space from the beginning/end? |
There was a problem hiding this comment.
If you are going to change the title, a better one would be "How do I trim a string". If you think they know what trim is, they don't need the rest of the words.
There was a problem hiding this comment.
But, also consider the people who haven't used other languages and haven't encountered trim.
Thinking about this, I think this change might wait for a trim to show up in Perl, which might be soon.
There was a problem hiding this comment.
I see this more as a combination of using the English verb "trim" with it coincidentally being the name of this common operation. Thus the additional explanation helps describe that it's referring to blank space specifically.
There was a problem hiding this comment.
I was shooting for keeping perldoc -q working, but to that end I would probably go with "remove space" as something people might search for. But, overall, it seemed as though folks thought that "trim" was the most common spelling for doing this to a string. I'm not much on SEO though, so whatever folks think is a good title. I thought this might make perl 5.34 while I'm sure trim won't.
How do I trim a string to remove whitespace from the beginning/end?
|
Maybe @Grinnz can support an internal redirect on perldoc.perl.org for the old question title. |
It would be an additional anchor added to the page, but it is possible. |
|
How about we keep the question as-is, but add a new question just above that references the original? e.g. "How do I...? ..see <link>, below." Then we preserve existing links to the question, and also get the word "trim" into the table of contents, for searchability. |
|
That's a good idea, but I would say the other way around: change the current title, and add a mostly-empty section for the old title, since the old title is there to preserve existing links but the new one is there to make |
As discussed on perl5-porters, folks looking for this entry may not find
it if they are coming from another language where this is commonly
called "trim".
I didn't realize this was maintained in a separate repo, so this replaces the previous:
Perl/perl5#18675