String

extension String: AnalyticsPropertyValue
extension String: Persistable
  • Converts a “camelCase” value to “PascalCase”. This is a very simple and naive implementation that assumes the input as a “camelCase” value and won’t perform complex conversions, such as from “snake_case” or “dash-case” to “PascalCase”.

    Note

    this method simply transforms the first character to uppercase.

    Declaration

    Swift

    public func pascalCased() -> String

    Return Value

    a string in “PascalCase” converted from “camelCase”

  • Converts a “PascalCase” value to “camelCase”. This is a very simple and naive implementation that assumes the input as a “PascalCase” value and won’t perform complex conversions, such as from “snake_case” or “dash-case” to “pascalCase”.

    Note

    this method simply transforms the first character to lowercase.

    Declaration

    Swift

    public func camelCased() -> String

    Return Value

    a string in “pascalCase” converted from “CamelCase”

  • Appends “s” to the end of the string to represent the pluralized form.

    Declaration

    Swift

    public func pluralize() -> String