Add {@code level} space caracteres at the begin of each lines of the
given {@code text}.

@param level the number of space caracteres to add
@param text  the text to prefix
@return the indented text
552220
protected String indentText( int level, String text )
    {
        StringBuilder buffer = new StringBuilder();
        String[] lines = text.split( "\n" );
        String prefix = StringUtils.leftPad( "", level );
        for ( String line : lines )
        {
            buffer.append( prefix ).append( line ).append( EOL );
        }
        return buffer.toString();
    }
16403
def indent(self, levels, first_line=None):
        """"""
        self._indentation_levels.append(levels)
        self._indent_first_line.append(first_line)
274666
public static String capitalize(String text) {
    if (isNullOrEmpty(text)) {
      return text;
    }
    char chars[] = text.toCharArray();
    chars[0] = Character.toUpperCase(chars[0]);
    return new String(chars);
  }
673368
public AnnotatedTextBuilder addText(String text) {
    parts.add(new TextPart(text, TextPart.Type.TEXT));
    return this;
  }
1015813
public JavaSrcTextBuffer printLinesWithIndent(final String text) {
    final String[] splitted = text.split("\n", -1);

    for (final String aSplitted : splitted) {
      this.indent().println(aSplitted);
    }

    return this;
  }
172308
public boolean append(String text) {
        return set(get() == null ? text : get().concat(text));
    }
756626
String indent(String s, int level) {
        return Stream.of(s.split("\n"))
                .map(sub -> INDENT_STRING.substring(0, level * INDENT_WIDTH) + sub)
                .collect(Collectors.joining("\n"));
    }
248109
private static String buildText(String text) {
    // <JAR><JAR> to PARAGRAPH mark in unicode
    text = doubleLineBreak.matcher(text).replaceAll(PARAGRAPH);
    // <JAR> to " "
    text = lineBreak.matcher(text).replaceAll(" ");
    return text;
  }
1189398
public ViterbiLattice build(String text) {
        int textLength = text.length();
        ViterbiLattice lattice = new ViterbiLattice(textLength + 2);

        lattice.addBos();

        int unknownWordEndIndex = -1; // index of the last character of unknown word

        for (int startIndex = 0; startIndex < textLength; startIndex++) {
            // If no token ends where current token starts, skip this index
            if (lattice.tokenEndsWhereCurrentTokenStarts(startIndex)) {

                String suffix = text.substring(startIndex);
                boolean found = processIndex(lattice, startIndex, suffix);

                // In the case of normal mode, it doesn't process unknown word greedily.
                if (searchMode || unknownWordEndIndex <= startIndex) {

                    int[] categories = characterDefinitions.lookupCategories(suffix.charAt(0));

                    for (int i = 0; i < categories.length; i++) {
                        int category = categories[i];
                        unknownWordEndIndex = processUnknownWord(category, i, lattice, unknownWordEndIndex, startIndex,
                                        suffix, found);
                    }
                }
            }
        }

        if (useUserDictionary) {
            processUserDictionary(text, lattice);
        }

        lattice.addEos();

        return lattice;
    }
579034
static void indent(final int depth, final int indentWidth, final StringBuilder buf) {
        final int maxIndent = INDENT_LEVELS.length - 1;
        for (int d = depth * indentWidth; d > 0;) {
            final int n = Math.min(d, maxIndent);
            buf.append(INDENT_LEVELS[n]);
            d -= n;
        }
    }
1360656
public void newlineShowText(String text) {
        state.yTLM -= state.leading;
        showText2(text);
        content.append("'").append_i(separator);
    }
488471
public void newlineShowText(float wordSpacing, float charSpacing, String text) {
        state.yTLM -= state.leading;
        content.append(wordSpacing).append(' ').append(charSpacing);
        showText2(text);
        content.append("\"").append_i(separator);

        // The " operator sets charSpace and wordSpace into graphics state
        // (cfr PDF reference v1.6, table 5.6)
        state.charSpace = charSpacing;
        state.wordSpace = wordSpacing;
    }
608787
public T text(CharSequence text, boolean goneIfEmpty) {

        if (goneIfEmpty && (text == null || text.length() == 0)) {
            return gone();
        } else {
            return text(text);
        }
    }
1057688
def indented(text, level, indent=2):
    """"""
    return "\n".join("%s%s" % (level * indent * " ", s) for s in text.splitlines())
706864
def add(self, txt, indent=0):
        
        self.text.append(u'{0}{1}'.format(' '*indent, txt))
960850
private static void appendIndentedNewLine(int indentLevel, StringBuilder stringBuilder) {
        stringBuilder.append("\n");
        for (int i = 0; i < indentLevel; i++) {
            // Assuming indention using 2 spaces
            stringBuilder.append("  ");
        }
    }
923141
public void addText(String text) {
        try {
            writer.append(text);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }