types.castString: Cast string

View source: R/types.castString.R

types.castStringR Documentation

Cast string

Description

Cast string that is, sequences of characters.

Usage

types.castString(format, value)

Arguments

format

available options are "default", "email", "uri", "binary" and "uuid", where

default

Any valid string.

email

A valid email address.

uri

A valid URI.

binary

A base64 encoded string representing binary data.

uuid

A string that is a uuid.

value

string to cast

See Also

Types and formats specifications

Examples


# cast any string
types.castString(format = "default", value = "string")

# cast email
types.castString(format = "email", value = "name@gmail.com")

# cast binary
types.castString(format = "binary", value = "dGVzdA==")

# cast uuid
types.castString(format = "uuid", value = "95ecc380-afe9-11e4-9b6c-751b66dd541e")


tableschema.r documentation built on Sept. 30, 2022, 1:06 a.m.