https://github.com/icio/flagsubstr
https://github.com/icio/flagsubstr
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/icio/flagsubstr
- Owner: icio
- Created: 2024-06-07T08:12:25.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-07T08:22:01.000Z (about 2 years ago)
- Last Synced: 2025-01-28T00:42:55.775Z (over 1 year ago)
- Language: Go
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# flagsubstr
Concatenate the emoji flags for countries AB and CD and the 4:12-byte substring
is the emoji flag for country BC:
```go
// GOEXPERIMENT=rangefunc go run github.com/icio/flagsubstr@latest | head
"🇦🇨🇦🇨"[4:12] == "🇨🇦" // AC: Ascension Island + AC: Ascension Island == CA: Canada
"🇦🇨🇦🇩"[4:12] == "🇨🇦" // AC: Ascension Island + AD: Andorra == CA: Canada
"🇦🇨🇦🇪"[4:12] == "🇨🇦" // AC: Ascension Island + AE: United Arab Emirates == CA: Canada
"🇦🇨🇦🇫"[4:12] == "🇨🇦" // AC: Ascension Island + AF: Afghanistan == CA: Canada
"🇦🇨🇦🇬"[4:12] == "🇨🇦" // AC: Ascension Island + AG: Antigua & Barbuda == CA: Canada
"🇦🇨🇦🇮"[4:12] == "🇨🇦" // AC: Ascension Island + AI: Anguilla == CA: Canada
"🇦🇨🇦🇱"[4:12] == "🇨🇦" // AC: Ascension Island + AL: Albania == CA: Canada
"🇦🇨🇦🇲"[4:12] == "🇨🇦" // AC: Ascension Island + AM: Armenia == CA: Canada
"🇦🇨🇦🇴"[4:12] == "🇨🇦" // AC: Ascension Island + AO: Angola == CA: Canada
"🇦🇨🇦🇶"[4:12] == "🇨🇦" // AC: Ascension Island + AQ: Antarctica == CA: Canada
```