php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #30796 String Write
Submitted: 2004-11-15 18:02 UTC Modified: 2004-11-15 18:46 UTC
From: bug@php.net Assigned:
Status: Wont fix Package: Feature/Change Request
PHP Version: 4CVS-2004-11-15 (stable) OS: Linux
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: bug@php.net
New email:
PHP Version: OS:

 

 [2004-11-15 18:02 UTC] bug@php.net
Description:
------------
Please add a function that is directly able to add a char or word at a numeric place in a string.

Reproduce code:
---------------
// For example:

str_ins([inser string], [int position], [string haystack]);



// For use like this:

$longtext = 'This is a long text...';

$found = 7;

echo str_ins("_a", $found-2, $longtext);

Expected result:
----------------
This_a is a long text...

Actual result:
--------------
An error *lol*

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-11-15 18:46 UTC] derick@php.net
You can easily do this in userspace, and recoding this in C won't make it much faster.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Jul 01 10:01:29 2024 UTC