Removing repeated string in javascript -
i have problem 1 of string has repeated url inside , want remove it. what's best way in javascript?
following example of string referring to.
var str = "http://www.example.comhttp://www.example.com"
one solution reassign str
half of itself.
str = str.substring(str.length/2)
(this assumes string follow same format example gave.)
Comments
Post a Comment