javascript - Remove part of a string before a certain position -


i have string want cut , remove first part.

something 'abcded-cddndcasds--xyz--jkajsjasasasasas'

i want remove before position x.

so far can find position of x, can't find quick function remove before.

thanks

try this

 $(function(){    var str = 'abcded-cddndcasds--xyz--jkajsjasasasasas';     var indexofx = str.indexof("x");     alert(str.substring(indexofx,str.length));  }); 

demo


Comments

Popular posts from this blog

matlab - How to equate a structure array to structure array -

c# - Operator '==' incompatible with operand types 'Guid' and 'Guid' using DynamicExpression.ParseLambda<T, bool> -