Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
samwhiteUK
on June 13, 2022
|
parent
|
context
|
favorite
| on:
Show HN: Tuc – When cut doesn’t cut it
When I want to use negative indices, I pipe the string through rev first, then do my cut, then rev again
mprovost
on June 13, 2022
[–]
That's the classic solution but blows up when using multibyte characters since rev just reads the bytes in each line in reverse.
Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: