Search code examples
javaandroidstringlogcat

Is there a length limit to String in Android?


I managed to read a web page into a string, but when I print it to LogCat, using Log.d(), It always displays less than what's really on that page.

Which leads me to suspect that one (or more) of the following are possible explanations:

  1. In Android, a String can grow dynamically, but it is eventually bound by some hard coded MAX_LENGTH.
  2. Log.d() is the one truncating a String output.

Is there a length limit to a String in Android?

If not, what could possible explain truncating my string?


Solution

  • Its the logcat that is not able to display whole text , print the output of the logcat to a file , I think you should be able to see the whole String.