“Hapus javascript slash trailing” Kode Jawaban

Hapus Slash dari String JavaScript

str = str.replace(/\\/g, '')
feddynventor

JS lepaskan slash trailing

let path = "/some/string/with-trailing-slash/"
path = path.replace(/\/$/, "") // /some/string/with-a-slash
// * * *
let path = "/some/string/without-a-trailing-slash"
path = path.replace(/\/$/, "") // /some/string/without-a-trailing-slash
FelDev

Hapus javascript slash trailing

string.replace(/\/$/, "")
FelDev

JavaScript Hapus Slash Trailing

function someFunction(site)     
{     
    return site.replace(/\/$/, "");
}
Condemned Caracal

Jawaban yang mirip dengan “Hapus javascript slash trailing”

Pertanyaan yang mirip dengan “Hapus javascript slash trailing”

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya