IndentationStyle

public enum IndentationStyle : Hashable, Sendable

The style of indentation used in a Swift project.

  • Swift source code should be indented using tabs.

    Declaration

    Swift

    case tabs
  • Swift source code should be indented using spaces with count spaces per indentation level.

    Declaration

    Swift

    case spaces(count: Int)
  • The string representation of one level of indentation.

    Declaration

    Swift

    public var indentationString: String { get }
  • The indentation string for the given number of levels.

    Declaration

    Swift

    public func indentation(for levels: Int) -> String
  • Counts the indentation level represented by a raw whitespace string.

    Declaration

    Swift

    public func levelCount(in rawIndent: String) -> Int