Is there a length limit for String in Android?

I managed to read the webpage in line, but when I print it to LogCat using Log.d (), it always appears less than what it actually is on this page.

This makes me suspect that one (or more) of the following possible explanations:

  • On Android, a string can grow dynamically, but ultimately is bound by some kind of hard-coded MAX_LENGTH.
  • Log.d () is one truncation of string output.

Length limit for string in Android?

If not, is it possible to explain the truncation of my line?

+4
source share
2 answers

Its logarithm, which cannot display all the text, prints the output of the logarithm to a file, I think you should see the whole line.

+7
source

True, Log.d () trims the tail above some MAX_LENGTH, but

System.out.println (string); 

prints the entire line.

0
source

Source: https://habr.com/ru/post/1343551/


All Articles