Not really. You can use the String.replace function with a loop.
code:
function replace(s,from,to){
while (s.indexOf(from) > -1){
s = s.replace(from,to);
}
return s;
}
Then you can say:
code:
var StringToReplace = 'aaaaaaaa';
StringToReplace = replace(StringToReplace,'a','A');