Indents a string.

@param  String  string
@param  Number  nchars
@param  String  prefix
@return String
1747
function indent(string, nchars, prefix) {
    "use strict";
    return string.split('\n').map(function(line) {
        return (prefix || '') + new Array(nchars).join(' ') + line;
    }).join('\n');
}
952749
function createRegexString(prefix) {
  var key = 'createRegexString:' + prefix;
  if (cache.hasOwnProperty(key)) {
    return cache[key];
  }
  var str = (prefix + '(\\d+)$}').replace(/\\?([${}])/g, '\\$1');
  cache[key] = str;
  return str;
}
387379
def indent(text: str, num: int = 2) -> str:
    """"""
    lines = text.splitlines()
    return "\n".join(indent_iterable(lines, num=num))
341666
protected synchronized void addPrefix(final String prefixString) {
		if (prefixString != null) {
			final Set<String> prefixes = getPrefixes();
			prefixes.add(prefixString);
			setPrefixes(prefixes);
		}
	}
111347
Rule XcomIndent() {
		return Sequence(String("indent"),
				OneOrMore(WSP()).suppressNode(),
				XcomNumber(), XcomUnit())
			.label(XcomIndent);
	}
1191981
function appendLine(num, content, prefix) {
    sb.append(prefix + lineNumbers[num] + ' | ' + content + '\n');
  }
804522
function blockHeader(string, indentPerLevel) {
  var indentIndicator = string[0] === ' ' ? String(indentPerLevel) : '';

  // note the special case: the string '\n' counts as a "trailing" empty line.
  var clip = string[string.length - 1] === '\n';
  var keep = clip && (string[string.length - 2] === '\n' || string === '\n');
  var chomp = keep ? '+' : clip ? '' : '-';

  return indentIndicator + chomp + '\n';
}
245800
function indent(str/*: string*/, level/*: number*/ = 1) /*: string*/ {
    if (typeof str === 'number') [ level, str ] = [ str, level ];
    if (typeof level !== 'number') level = 1;
    return (str || '').replace(/^/gm, '  '.repeat(level));
}
795741
def _indent(indent=0, quote='', indent_char=' '):
    """"""
    if indent > 0:
        indent_string = ''.join((
            str(quote),
            (indent_char * (indent - len(quote)))
        ))
    else:
        indent_string = ''.join((
            ('\x08' * (-1 * (indent - len(quote)))),
            str(quote))
        )

    if len(indent_string):
        INDENT_STRINGS.append(indent_string)
94791
protected function addIndent(string $string, int $indent = 0): string
    {
        return str_repeat(self::INDENT, max($indent, 0)) . $string;
    }
1289625
protected static void indent(StringBuilder buffer, int number, String character) {
		for (int i = 0; i < number; ++i) {
			buffer.append(character);
		}
	}
87999
function indent(string, column) {
  const spaces = new Array(++column).join(COLUMN);

  return string.replace(RE_LINE_BEGIN, spaces);
}
993178
def indent(value, n=2, character=' '):
    

    prefix = n * character
    return '\n'.join(prefix + line for line in value.splitlines())
1264457
private static void formatNumber(int n, String type, StringBuilder to) {
    checkArgument(n > 0);
    to.append(n).append(' ').append(type).append(n == 1 ? "" : "s");
  }
758691
def indent(lines, amount, ch=' '):
    """"""
    padding = amount * ch
    return padding + ('\n' + padding).join(lines.split('\n'))
549057
def get_indent(self, string):
        
        indent_amt = 0

        if string[0] == '\t':
            return '\t'
        for char in string:
            if char == ' ':
                indent_amt += 1
            else:
                return ' ' * indent_amt
170347
def indent_string(string, *args)
      string = string.dup
      indent_string!(string, *args)
      string
    end