php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #60975 case insensitive implementation of strpbrk
Submitted: 2012-02-03 20:57 UTC Modified: -
From: jonathan at scriptwriterthingy dot com Assigned:
Status: Open Package: *General Issues
PHP Version: Irrelevant OS: Linux/CentOS
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2012-02-03 20:57 UTC] jonathan at scriptwriterthingy dot com
Description:
------------
strpbrk() is case sensitive. It would be great to see a case insensitive 
implementation - stripbrk()


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-02-04 10:41 UTC] bobwei9 at hotmail dot com
Simply use this workaround:


function stripbrk ($haystack, $charlist)
{
 return strpbrk($haystack, strtolower($charlist).strtoupper($charlist));
}
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Wed Nov 13 14:01:29 2019 UTC