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

python - matpltolib navigation toolbar edit curves and parameters line color automatically changes issue -

node.js - Nodejs javascript implementation of PBEWithMD5AndTripleDES/CBC/PKCS5Padding -