Ma fare semplicemente
codice:
strText.replace(0,strText.length(), '_', '.');
?