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
Locale
for the plain text value.phoneticString
Phonetic string, if available.
-
Plan text value.
Declaration
Swift
public let plainText: String
-
Locale
for the plain text value.Declaration
Swift
public let plainTextLanguage: Locale
-
Phonetic string, if available.
Declaration
Swift
public let phoneticString: PhoneticString?
-
Exceptions that can be thrown during the creation of
See moreTextWithPhonetics
.Declaration
Swift
public enum InitializationError : Error