FHIRString

public struct FHIRString: FHIRPrimitive, CustomStringConvertible, ExpressibleByStringLiteral

Struct to hold on to strings.

  • The actual string value.

    Declaration

    Swift

    public var string: String
  • id

    An optional id of the element.

    Declaration

    Swift

    public var id: String?
  • The parent/owner of the receiver, if any. Used to dereference resources.

    Declaration

    Swift

    public weak var _owner: FHIRAbstractBase?
  • Optional extensions of the element.

    Declaration

    Swift

    public var extension_fhir: [Extension]?
  • Returns true if the string is the empty string.

    Declaration

    Swift

    public var isEmpty: Bool
  • Designated initializer.

    Declaration

    Swift

    public init(_ string: String)

    Parameters

    string

    The string represented by the receiver

  • Declaration

    Swift

    public init(json: JSONType, owner: FHIRAbstractBase?, context: inout FHIRInstantiationContext)

    Parameters

    json

    The value in its associated JSONType

    owner

    Optional, the owning element

    context

    An in-out parameter for the instantiation context

  • Declaration

    Swift

    public func asJSON(errors: inout [FHIRValidationError]) -> JSONType

    Parameters

    errors

    Errors encountered during serialization

    Return Value

    The FHIRJSON reperesentation of the receiver

  • Declaration

    Swift

    public var description: String
  • Declaration

    Swift

    public static func ==(l: FHIRString, r: FHIRString) -> Bool

    Parameters

    lhs

    A value to compare.

    rhs

    Another value to compare.

  • Undocumented

    Declaration

    Swift

    public struct FHIRString: FHIRPrimitive, CustomStringConvertible, ExpressibleByStringLiteral
  • Undocumented

    Declaration

    Swift

    public struct FHIRString: FHIRPrimitive, CustomStringConvertible, ExpressibleByStringLiteral
  • Declaration

    Swift

    public static func <(lh: FHIRString, rh: FHIRString) -> Bool

    Parameters

    lhs

    A value to compare.

    rhs

    Another value to compare.

  • Undocumented

    Declaration

    Swift

    public struct FHIRString: FHIRPrimitive, CustomStringConvertible, ExpressibleByStringLiteral
  • Undocumented

    Declaration

    Swift

    public struct FHIRString: FHIRPrimitive, CustomStringConvertible, ExpressibleByStringLiteral
  • Declaration

    Swift

    public var hashValue: Int
  • The string, localized in the device language; uses Locale.current with localized(in: Locale)

    Declaration

    Swift

    public var localized: String
  • Returns the string localized in the given locale, if available, self.string otherwise.

    The method will fall back to language code only if you provide a language and region code (e.g. en-US) but a localization is only available for the language code (e.g. en) or a different region (e.g. en-AU).

    Declaration

    Swift

    public func localized(in locale: String) -> String

    Parameters

    locale

    The name of the locale for which to retrieve the localization, e.g. “fr” or “de-CH”

    Return Value

    A String in the given locale, untranslated otherwise

  • Returns the string localized in the given locale, if available, self otherwise.

    The method will fall back to language code only if you provide a language and region code (e.g. en-US) but a localization is only available for the language code (e.g. en) or a different region (e.g. en-AU).

    Declaration

    Swift

    public func localized(in locale: Locale) -> FHIRString

    Parameters

    locale

    The locale for which to retrieve the localization

    Return Value

    The FHIRString in the given locale, untranslated otherwise