Be concise.
Be useful.
All contributions dictatorially edited by webmasters to match personal tastes.
Please do not paste any copyright violating material.
Please try to avoid dependencies to third-party libraries and frameworks.
(def s2 (clojure.string/replace s1 w ""))
string s2 = s1.Replace(w, string.Empty);
var s2 = s1.replaceAll(w,"");
s2 = String.replace(s1, w, "")
S2 = string:replace(S1, W, "", all).
character(len=:), allocatable :: s1
character (len=:), allocatable :: s2
character(len=:), allocatable :: w
integer :: i, j, k, tc
allocate (s2, mold=s1)
i = 1
j = 1
do
k = index (s1(i:), w)
if (k == 0) then
s2(j:j+len(s1)-i) = s1(i:)
s2 = s2(:j+len(s1)-i)
exit
else
tc = k - 1
if (tc > 0) s2(j:j+tc-1) = s1(i:i+tc-1)
i = i + tc + len(w)
j = j + tc
end if
end do
var regex = RegExp(w, 'g');
var s2 = s1.replace(regex, '');
const s2 = s1.split(w).join('')
String s2 = s1.replace(w, "");
s2 = s1:gsub(w,"")
$s2 = str_replace($w, '', $s1);
s2 = s1.replace(w, '')
s2 = s1.gsub(w, "")
s2 = s1.replace(w, "");
let s2 = str::replace(s1, w, "");
Dim s2 As String = s1.Replace(w, String.Empty)