I am scanning my text and converting text to links. How do I replace the emoji chars from the link
for example pic.twitter.com/OIWBW3lnYBnY
I want to replace it with pic.twitter.com/OIWBW3lnYBnY
Note the space after the character
Any ideas?
I am scanning my text and converting text to links. How do I replace the emoji chars from the link
for example pic.twitter.com/OIWBW3lnYBnY
I want to replace it with pic.twitter.com/OIWBW3lnYBnY
Note the space after the character
Any ideas?
window.onload = function() {
//this is the code
var x='pic.twitter.com/OIWBW3lnYBnY';
//and this
var emoji_chars='-- ';
var y=x.replace(x.substring(0,4),emoji_chars);
// or (0,4) change (0,2)
//example
document.body.innerHTML=y;
};