1

I use this code for replace this • character with \n in textview in android

        TextView tvcontent=(TextView) row.findViewById(R.id.row_comment_content);
        tvcontent.setText(content[position].replace("•", "\n"));

Now I want to replace this char in the image https://i.stack.imgur.com/cnJeI.jpg but I don't know what is the ASCII code of that char in the image to replace in android.

If you know what is ASCII code of the char please help.

madhan kumar
  • 1,560
  • 2
  • 26
  • 36
Bigeye
  • 13
  • 2
  • 7

3 Answers3

1

If you mean a middot char, its code is 183.
Also, maybe this link can help.

Ok, now I got what you want.
This page would answer your question. Brief extract from this page:

this is OBJECT REPLACEMENT CHARACTER and it's code in Java is \uFFFC. Also I typed it in Android Studio - it works (screen below): enter image description here
If you possibly need it in HTML - it's code is  ().

And don't forget to use single quote when you will replace this char!

Community
  • 1
  • 1
Goltsev Eugene
  • 3,325
  • 6
  • 25
  • 48
0

Use this code:

String a = "your content with dots";
String b = a.replace("dots", "\n");
textview.settext(b);
Floern
  • 33,559
  • 24
  • 104
  • 119
Ankesh kumar Jaisansaria
  • 1,563
  • 4
  • 26
  • 44
0

Try running this code to find the ascii value of any character. But for this bullet I don't think there is any ascii code.

public class HelloWorld{

     public static void main(String []args){
         String s= "•";
         int a =  s.charAt(0);
        System.out.println("Ascii code is  "+ a);

     }
}

Here when we run this code then compiler shows an error:

unmapped character for encoding ascii.

But in future if you want to know ascii code of any character that is actually ascii, just use this function.

Magisch
  • 7,312
  • 9
  • 36
  • 52
Ankesh kumar Jaisansaria
  • 1,563
  • 4
  • 26
  • 44