Tag

public struct Tag
extension Tag: CustomStringConvertible
extension Tag: Comparable
extension Tag: Hashable

A Tag is just a String which can be attatched to a Transaction

  • the name of the tag without the leading #

    Declaration

    Swift

    public let name: String
  • Creates a tag

    Declaration

    Swift

    public init(name: String)

    Parameters

    name

    the name of the tag, should be without the leading #

  • the string of how to represent the tag in the ledger file, e.g. with # at the beginning

    Declaration

    Swift

    public var description: String { get }
  • Compares the name of two tags

    Declaration

    Swift

    public static func < (lhs: Tag, rhs: Tag) -> Bool

    Parameters

    lhs

    first tag

    rhs

    second tag

    Return Value

    if the name of tag 1 is < name of tag 2

  • Compares the name of two tags

    Declaration

    Swift

    public static func == (lhs: Tag, rhs: Tag) -> Bool

    Parameters

    lhs

    first tag

    rhs

    second tag

    Return Value

    if name of both tags match

  • Declaration

    Swift

    public func hash(into hasher: inout Hasher)