| i've been writing some stuff in arc and keep wanting 2 things, maybe they should be added: 1) a function to find the index of the last occurrence of a substring in a string. In ruby this is String#rindex. 2) cut should take indices from the right. I've seen this suggested before. like if str is "how are you" and I want to extract "yo" from that. I know you can say (cut str (- (len str) 3) -1)
but I really want to say: (cut str -3 -2)
and not (cut str -2 -1), although i guess i could get used to that. but it's easier to think the first one, because I want everything between 3 from the end and 2 from the end, not between 2 from the end and 1 from the end. |