@warrenm cannot make a String.Index from an int
-
-
-
@kongtomorrow That is the “lol, wat”-deservingest restriction I’ve seen so far. -
@warrenm 'cause it's all fancy unicodeness. indexing isn't O(1), all you can do is iterate. -
@kongtomorrow Oh, I get that. But I’m happy to take the O(n) hit when removing a substring. Hate having my hands tied in ridiculous ways. -
@warrenm `str[str.startIndex..<advance(str.startIndex,4)]`, woo. -
@kongtomorrow This worked. I can’t say I’m blown away by the elegance, though.
End of conversation
New conversation -
-
-
@warrenm can’t use ‘?’ did you mean ‘!’ ? <change to ‘!’> can’t use ‘!’ did you mean ‘?’ ? one infinite loop, indeed.Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
@bkobilansky@warrenm Please tell me Range<String.Index>(end: 4, start: 0) works.Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
@warrenm Try alpha: and omega:Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.