Top "Str-replace" questions

This function returns a string or an array with all occurrences of search in subject replaced with the given replace value.

Replacing certain characters in javascript

Coming from a PHP background, I am a little spoiled with the str_replace function which you can pass an …

javascript string replace str-replace
Remove Unicode Zero Width Space PHP

I have a text in Burmese language, UTF-8. I am using PHP to work with the text. At some point …

php unicode str-replace
Performance of str_replace in PHP

Here I have 2 methods using str_replace to replace strings in a given phrase. // Method 1 $phrase = "You should eat fruits, …

php str-replace
My code with str_replace don't work

why this code isn't working? I was trying to rename, switch location and other, but it seems to be str_…

php class str-replace construct
How to remove spaces from a text input box

I have the following jQuery shell which works: $('.jq_noSpaces').on('change', function(){ alert('you changed the value in …

jquery onchange str-replace
PHP / Regex: extract string from string

I just started using PHP and hope someone here can help me with this. I am trying to extract a …

php regex str-replace substr strstr
Regular expression to remove an iframe

I'm trying to use str_replace to replace all iframes with my own content. I believe I can use regular …

php regex iframe str-replace
PHP: Escaping RegEx-reserved characters - anyone know what's wrong with this?

I'm trying to escape regex-reserved characters with a backslash (don't ask -- suffice it to say I'm NOT trying to …

php regex str-replace
C++ replace multiple strings in a string in a single pass

Given the following string, "Hi ~+ and ^*. Is ^* still flying around ~+?" I want to replace all occurrences of "~+" and "^*" with "Bobby" …

c++ string boost str-replace
In C++, what's the fastest way to replace all occurrences of a substring within a string with another string?

I'm looking for the most efficient (in terms of "fastest") way to replace all occurrences of a substring within a …

c++ string performance stl str-replace