Simply i want to replace a character with another in android.. My code:
et = (EditText) findViewById(R.id.editText1);
String str = et.getText().toString();
str.replace(' ','_');
et.setText(str);
System.out.println(str);
But here the "space" is not replaced by "underscore".. I also tried other character too..
please help!!
See code:
et = (EditText) findViewById(R.id.editText1);
String str = et.getText().toString();
str = str.replace(' ', '_');
System.out.println(str);