Hacker News new | past | comments | ask | show | jobs | submit login

Wow, I actually never knew that it was [index, length]. I usually just pass a range as the key when I'm doing stuff like that, so you can do "hello"[2..3] (2 <= i <= 3) or "hello"[2...3] (2 <= i < 3).



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: