php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #12521 chop(), trim() enhancements
Submitted: 2001-08-01 16:31 UTC Modified: 2001-08-03 18:19 UTC
From: e at arix dot com Assigned: jeroen (profile)
Status: Closed Package: Feature/Change Request
PHP Version: 4.0.4pl1 OS: Linux RH 7.1
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: e at arix dot com
New email:
PHP Version: OS:

 

 [2001-08-01 16:31 UTC] e at arix dot com
it would be useful if the chop() and trim() functions accepted an optional second parameter indicating what to chop or trim, instead of simply assuming one wants to remove whitespace.  In Perl the $/ varialbe controls what is chopped, but a parameter would be nicer!

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-08-01 16:40 UTC] jeroen@php.net
Good idea. The second parameter should IMO be a string containing all characters to be chopped, or like addcslashes.

Assigning to myself, if anyone has any objections/remarks, please mail me. I think the c-slashes way is the best.
 [2001-08-03 18:19 UTC] jeroen@php.net
In CVS, will probably be in PHP 4.0.7

It uses the addclashes way of specifying what to chop, as second parameter.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 05 08:01:30 2024 UTC