find character array length in Android
<p>to get length of string</p>

<pre><code>String str=strLenData.toString();
int ipLen= str.length();
return ipLen;
</code></pre>

<p>whatever be the value of <code>strLenData</code>, value of <code>str</code>= <em>[C@40523f80</em>. As a result, for every char[] I input, the length is shown as 11. </p>

<p>I have to use the length as a limit to a loop. Many a times the actual length of char [] would be less than 11. In those cases, the application crashes with the <code>java.lang.ArrayIndexOutOfBoundsException</code>. </p>

<p>Is there any other method to find the length of array. In C++ we might look for <code>'\x0'</code> to mark the end of string. But I guess that is not valid case in Android. </p>
