Adds indentation to each line of a string
为字符串的每行添加缩进
The string to indent. 要缩进的字符串
The indentation string. Default is ' ' (two spaces). 缩进字符串,默认为两个空格
The indented string. 缩进后的字符串
indent('hello\nworld', ' ') // => ' hello\n world'indent('foo\nbar', '\t') // => '\tfoo\n\tbar' Copy
indent('hello\nworld', ' ') // => ' hello\n world'indent('foo\nbar', '\t') // => '\tfoo\n\tbar'
Adds indentation to each line of a string
为字符串的每行添加缩进