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.

How to replace all occurrences of a character in string?

What is the effective way to replace all occurrences of a character with another character in std::string?

c++ algorithm str-replace stdstring
How can I perform a str_replace in JavaScript, replacing text in JavaScript?

I want to use str_replace or its similar alternative to replace some text in JavaScript. var text = "this is …

javascript replace str-replace
Str_replace for multiple items

I remember doing this before, but can't find the code. I use str_replace to replace one character like this: …

php string str-replace
PHP str_replace replace spaces with underscores

Is there a reason that I'm not seeing, why this doesn't work? $string = $someLongUserGeneratedString; $replaced = str_replace(' ', '_…

php str-replace
C# string replace

I want to replace "," with a ; in my string. For example: Change "Text","Text","Text", to this: "Text;Text;Text", …

c# string replace str-replace
str_replace with array

I'm having some troubles with the PHP function str_replace when using arrays. I have this message: $message = strtolower("L …

php arrays str-replace
How to Replace dot (.) in a string in Java

I have a String called persons.name I want to replace the DOT . with /*/ i.e my output will be …

java str-replace
How to replace multiple items from a text string in PHP?

I want to be able to replace spaces with - but also want to remove commas and question marks. How …

php string str-replace
can you write a str.replace() using dictionary values in Python?

I have to replace the north, south, etc with N S in address fields. If I have list = {'NORTH':'N',…

python dictionary str-replace
str_replace in Twig

I want to do a simple str_replace in my twig template. I'm new to twig and probably I need …

php filter str-replace twig