Thanks Brucey. I actually noticed this stuff right after I posted that, but I could hardly believe the strangeness of it (especially the "Right" one). I mean, why not create string methods by these names that do the basic math for you and return the slices. Oh well.
Is there a way to add methods to an existing type? I'll do it myself if I can.
The way slices is implemented, it's not consistent.
[X..] means get the values starting with index X
[X..Y] means get values of index X-Y
[..X] means get the first X values (instead of values UP TO index X)
Is there a way to add methods to an existing type? I'll do it myself if I can.
The way slices is implemented, it's not consistent.
[X..] means get the values starting with index X
[X..Y] means get values of index X-Y
[..X] means get the first X values (instead of values UP TO index X)