Documentation Language: Swift

Property

asString

Returns the indentation string for the current level.

var asString: String { get }

Discussion

This is computed by repeating the indentString level times. For level 0, returns an empty string.

Example

let spaces = MTLIndentation(level: 2, indentString: "  ")
print(spaces.asString)  // "    " (4 spaces)

let tabs = MTLIndentation(level: 3, indentString: "\t")
print(tabs.asString)  // "\t\t\t" (3 tabs)