S2BSubRipFile

public struct S2BSubRipFile

A .srt file

  • Initialize a S2BSubRipFile with its content.

    Declaration

    Swift

    public init(content: String)

    Parameters

    content

    content of a srt file.

  • Initialize a S2BSubRipFile with the url, nil if file not found.

    Declaration

    Swift

    public init?(url: URL, stringEncoding enc: String.Encoding = .utf8)

    Parameters

    url

    url to the srt file.

    enc

    encoding of the file content.

  • Initialize a S2BSubRipFile with its path, nil if file not found.

    Declaration

    Swift

    public init?(path: String, stringEncoding enc: String.Encoding = .utf8)

    Parameters

    path

    path to the srt file.

    enc

    encoding of the file content.

  • Convert back to what it would be like in a .srt file.

    Declaration

    Swift

    public var description: String