CaseList - XcodeExtKit/XcodeExtBase GitHub Wiki

CaseList

enum case list, can have diff formats case cat, dog, etc or each case on diff line, or several lines with groups of cases

public struct CaseList: SwiftT

Inheritance

SwiftT

Initializers

init(_:numLines:)

numLines - use Int.max to put each case on diff line

init(_ cases: [CaseObj], numLines: Int)

Properties

cases

each case can have format "case .cat(Animal)"

var cases: [CaseObj]

numLines

use Int.max to put each case on diff line

var numLines: Int

str

var str: Str

Methods

oneLine(_:)

static func oneLine(_ cases: [CaseObj]) -> CaseList

maxLines(_:)

static func maxLines(_ cases: [CaseObj]) -> CaseList

oneLine(_:)

static func oneLine(_ cases: [Str]) -> CaseList

maxLines(_:)

static func maxLines(_ cases: [Str]) -> CaseList

makeLine(with:)

case cat, dog, etc

func makeLine(with cases: [CaseObj]) -> Str