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 tab with   in PHP?

In my database I have the following text: for x in values: print x I want to print this code …

php html str-replace nl2br
PHP explode the string, but treat words in quotes as a single word

How can I explode the following string: Lorem ipsum "dolor sit amet" consectetur "adipiscing elit" dolor into array("Lorem", "ipsum", "…

php quotes explode str-replace
Escaping escape Characters

I'm trying to mimic the json_encode bitmask flags implemented in PHP 5.3.0, here is the string I have: $s = addslashes(…

php escaping json str-replace
Replacing \r\n (newline characters) after running json_encode

So when I run json_encode, it grabs the \r\n from MySQL aswell. I have tried rewriting strings in …

php mysql str-replace json
How to find and replace all occurrences of a substring in a string?

I need to search a string and edit the formatting of it. So far I can replace the first occurrence …

c++ string algorithm str-replace
How to remove accents and tilde in a C++ std::string

I have a problem with a string in C++ which has several words in Spanish. This means that I have …

c++ string text str-replace
array_map with str_replace

Is it possible to use array_map in conjunction with str_replace without calling another function to do the str_…

php str-replace array-map
How to remove 'em' dash from a string?

I've looked at other solutions here and here, but it's not working for me. Code $s1clean = 'ALIEN - FILM …

php str-replace
Replace dash character in Java String

I tried to replace "-" character in a Java String but is doesn't work : str.replace("\u2014", ""); Could you help …

java string replace str-replace
Replace " ’ " with " ' " in PHP

I'm grabbing a string from the database that could be something like String’s Title however I need to replace …

php str-replace apostrophe