javascript - AngularJS: delete charAt last index of "," -


how write code in angularjs delete character @ last index of ",".

here equivalent java code:

stringbuilder.deletecharat(stringbuilder.lastindexof(",")); 

please help.

you

str = str.replace(/,([^,]*)$/, "$1"); 

or

var pos = str.lastindexof(","); str = str.substr(0, pos) + str.substr(pos + 1); 

Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -