поля и методы country
Поле — это простой факт о значении, который читается через точку без скобок: $value.name. Метод принимает аргументы или выполняет действие и вызывается через ->: $value->name(arguments), или с передачей значения через конвейер: $value |> name(arguments).
Поля
| Поле | Тип | Описание |
|---|---|---|
.alpha3 | string | Трёхбуквенный код: GBR. |
.currency | currency | Валюта, которая используется в стране: GBP. |
.flag | string | Эмодзи флага страны: 🇬🇧. |
.name | string | Название страны на английском: United Kingdom. |
Методы из any
->convert(from?: 'json'|yaml|'csv'|'markdown'|'latex', to?: 'json'|yaml|'csv'|html|'markdown'|'latex', header?: bool, as?: type, headers?: list, indented?: bool)->from(type: 'json'|yaml|'csv'|'markdown'|'latex', header?: bool, as?: type)->is_a(type: word)->is_null()->or(fallback)->to(type: 'json'|yaml|'csv'|html|'markdown'|'latex', headers?: list, indented?: bool)->to_string()->type()
Методы из string
->contains(text, ignore_case?: bool)->count()->ends_with(text, ignore_case?: bool)->escape()->index_of(text, ignore_case?: bool, last?: bool)->markdown_escape()->matches(pattern: regex)->pad(width: number, char?, start?: bool)->slice(start: number, end?: number)->starts_with(text, ignore_case?: bool)->truncate(length: number, suffix?)->url_encode()