Android Utililty Methods Array to String Convert

List of utility methods to do Array to String Convert

Description

The list of methods to do Array to String Convert are organized into topic(s).

Method

StringtoString(Object obj)
to String
if (obj == null) {
    return "";
return obj.toString().trim();
StringtoString(float[] iArray)
to String
if (iArray == null) {
    return "NULL";
StringBuilder buffer = new StringBuilder();
buffer.append("[");
for (int i = 0; i < iArray.length; i++) {
    buffer.append(iArray[i]);
    if (i != (iArray.length - 1)) {
...
StringtoString(long[] iArray)
to String
if (iArray == null) {
    return "NULL";
StringBuilder buffer = new StringBuilder();
buffer.append("[");
for (int i = 0; i < iArray.length; i++) {
    buffer.append(iArray[i]);
    if (i != (iArray.length - 1)) {
...
StringtoString(int[] iArray)
to String
if (iArray == null) {
    return "NULL";
StringBuilder buffer = new StringBuilder();
buffer.append("[");
for (int i = 0; i < iArray.length; i++) {
    buffer.append(iArray[i]);
    if (i != (iArray.length - 1)) {
...
StringtoString(String[] iArray)
to String
if (iArray == null) {
    return "NULL";
StringBuilder buffer = new StringBuilder();
buffer.append("[");
for (int i = 0; i < iArray.length; i++) {
    buffer.append("'").append(iArray[i]).append("'");
    if (i != iArray.length - 1) {
...
StringtoString(String s)
Returns the string, in single quotes, or "NULL".
if (s == null) {
    return "NULL";
} else {
    return new StringBuilder(s.length() + 2).append("'").append(s)
            .append("'").toString();
StringtoString(int[][] iArray)
to String
if (iArray == null) {
    return "NULL";
StringBuilder buffer = new StringBuilder();
buffer.append("[");
for (int i = 0; i < iArray.length; i++) {
    buffer.append("[");
    for (int j = 0; j < iArray[i].length; j++) {
...
StringtoString(long[][] iArray)
to String
if (iArray == null) {
    return "NULL";
StringBuilder buffer = new StringBuilder();
buffer.append("[");
for (int i = 0; i < iArray.length; i++) {
    buffer.append("[");
    for (int j = 0; j < iArray[i].length; j++) {
...
StringtoString(Object[] obj)
to String
if (obj == null) {
    return "NULL";
StringBuilder tmp = new StringBuilder();
tmp.append("[");
for (int i = 0; i < obj.length; i++) {
    tmp.append(obj[i].toString());
    if (i != obj.length - 1) {
...
StringtoString(float[] iArray)
to String
if (iArray == null) {
    return "NULL";
StringBuilder buffer = new StringBuilder();
buffer.append("[");
for (int i = 0; i < iArray.length; i++) {
    buffer.append(iArray[i]);
    if (i != (iArray.length - 1)) {
...