TextWithPhonetics
public struct TextWithPhonetics : Equatable
Represents a localized string with optional phonetics information.
Creates an instance with the specified parameters.
Throws
An error of the typeInitializationError
.
Declaration
Swift
public init(
plainText: String,
plainTextLanguage: Locale,
phoneticString: PhoneticString? = nil
) throws
Parameters
plainText
|
Plain text value. |
plainTextLanguage
|
|
phoneticString
|
Phonetic string, if available. |
Exceptions that can be thrown during the creation of TextWithPhonetics
.
Declaration
Swift
public enum InitializationError : Error
Phonetic string, if available.
Declaration
Swift
public let phoneticString: PhoneticString?
Plan text value.
Declaration
Swift
public let plainText: String
Locale
for the plain text value.
Declaration
Swift
public let plainTextLanguage: Locale