Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

not quite. "foo"[2] is a char, ("foo"+2) is a string.



oh, bother, I forgot what HN does to asterisks. In what I wrote above, look for the bit in italics and mentally insert asterisks on each side of it. It was right when I typed it in, I promise...




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: