Formatters

public struct Formatters

Collection of value formatters that use localized strings.

  • Undocumented

    See more

    Declaration

    Swift

    public struct Strings
  • Undocumented

    Declaration

    Swift

    public static let strings: Strings
  • Obtain a formatted slider value.

    Declaration

    Swift

    public static func format(sliderValue: Float) -> String
  • Obtain a formatted representation of a file count

    Declaration

    Swift

    public static func format(fileCount: Int) -> String

    Parameters

    fileCount

    value to format

    Return Value

    string value

  • Obtain a formatted representation of a preset count value.

    Declaration

    Swift

    public static func format(presetCount: Int) -> String

    Parameters

    presetCount

    value to format

    Return Value

    string value

  • Undocumented

    Declaration

    Swift

    public static func format(favoriteCount: Int) -> String
  • Undocumented

    Declaration

    Swift

    public static func format(emptyFileCount: Int) -> String
  • Undocumented

    Declaration

    Swift

    public static func format(invalidFileCount: Int) -> String
  • Undocumented

    Declaration

    Swift

    public static func format(failedToAddFileCount: Int) -> String
  • Generate a string that shows what failed when attempting to add one or more sound fonts to the app.

    Declaration

    Swift

    public static func makeAddSoundFontFailureText(failures: [SoundFontFileLoadFailure]) -> String

    Parameters

    failures

    the list of failures

    Return Value

    string value

  • Generate a string that shows the success and failures when adding one or more sound fonts to the app.

    Declaration

    Swift

    public static func makeAddSoundFontBody(
      ok: [String], failures: [SoundFontFileLoadFailure],
      total: Int
    ) -> String

    Parameters

    ok

    the names of the sound fonts that succeeded

    failures

    the collection of failures and their reasons

    total

    total number of sound fonts attempted

    Return Value

    string value