$ irb
> segments = 'sub.example.com'.split('.')
=> ["sub", "example", "com"]
> variants = segments.map.with_index { |_, i| segments[i..-1].joi
n('.') }
=> ["sub.example.com", "example.com", "com"]
Embed Notice
HTML Code
Corresponding Notice
- Embed this notice
zunda (zundan@mastodon.zunda.ninja)'s status on Thursday, 29-Dec-2022 15:37:04 JSTzunda