Android Utililty Methods String Indent

List of utility methods to do String Indent

Description

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

Method

Stringindent(int level)
indent
return indent(level, 4);
Stringindent(int level, int spaces)
indent
StringBuilder result = new StringBuilder();
for (int i = 0; i < level; i++) {
    for (int j = 0; j < spaces; j++) {
        result.append(" ");
return result.toString();
StringgetIndent(String text)
Get the whitespace that is the prefix of the given text
String ret = "";
char chTemp;
String strTemp;
boolean boolA, boolB;
for (int i = 0; i < text.length(); i++) {
    boolA = false;
    boolB = false;
    chTemp = text.charAt(i);
...
StringBufferappendIndentString(StringBuffer appendToMe, int level)
Appends spaces to the supplied StringBuffer, returns the same StringBuffer.
while (level-- > 0)
    appendToMe.append(' ');
return appendToMe;
StringgetIndentStringWithLevel(int level)
Appends spaces to the supplied String
StringBuffer rt = new StringBuffer(level);
return appendIndentString(rt, level).toString();