parse_cost: Parse mana costs

Description Usage Arguments Details Value References Examples

View source: R/api-symbols.R

Description

Parses the given mana cost argument and returns Scryfall's interpretation.

Usage

1
parse_cost(cost)

Arguments

cost

The mana string to parse. For more information, see details.

Details

The server understands most community shorthand for mana costs (such as 2WW for {2}{W}{W}). Symbols can also be out of order, lowercase, or have multiple colorless costs (such as 2{g}2 for {4}{G}).

If part of the string could not be understood, the server will return an error describing the problem.

Value

A data frame with 1 row and the following columns:

References

https://scryfall.com/docs/api/card-symbols/parse-mana

Examples

1
2
# Parse mana costs
parse_cost("2g2")

curso-r/scryr documentation built on Feb. 3, 2022, 12:37 a.m.