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:
- In Android, a String can grow dynamically, but it is eventually bound by some hard coded MAX_LENGTH.
- Log.d() is the one truncating a String output.
Is there a length limit to a String in Android?
If not, what c开发者_如何学运维ould possible explain truncating my string?
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.
True, Log.d() truncates the tail end above some MAX_LENGTH, but
System.out.println (string);
outputs the whole string.
精彩评论