[swift-users] See documentation comment for discussion

Marco S Hyman marc at snafu.org
Sun Jun 19 21:45:20 CDT 2016


> On Jun 19, 2016, at 6:35 PM, Maury Markowitz via swift-users <swift-users at swift.org> wrote:
> 
> All true, except, of course, when one is working with strings that really do work perfectly weel qwith 1...2, like the strings I'm processing, which came from 80-column punch cards originally used with LLNL's CDC 6600 (serial #2 IIRC). I had totally forgotten I had written this:

I’d claim those are not strings, they are arrays of Uint8.

As for your subscript... in the code "mystring[0...1]” [0...1] is not a Range<Int>, it is a CountableClosedRange<Int>.  The error message told you that.  If you change your subscript to use CountableClosedRange<Int> instead of Range<Int> it works -- but it’s not something I think I’d do.

Marc


More information about the swift-users mailing list