I need to modify a string with jQuery. Suppose I have a variable address:
var endereço = "Rua emanuel meira martins 85 cic curitiba...";
The idea is to remove all letters after position 15 and add three dots (…).
How can I perform this operation?
You can do this:
var endereço = 'Rua emanuel meira martins 85 cic curitiba'.slice(0, 15) + '...';
In this case you give:
Rua emanuel mei...