On 2 Nov., 03:16, "Just Another Victim of the Ambient Morality"
<ihates... / hotmail.com> wrote:
> "Michael W. Ryder" <_mwryde... / gmail.com> wrote in messagenews:d3oHm.2522$1R3.528 / newsfe18.iad...
>
>
>
> > What method doesn't work?  ¨Βωονεαξ τθστςιξηΫ­ιξδεψ¬ ιξδεψέ νετθοδ ιτ
> > does work fine for me.  ¨Β αν υσιξ±®Ή®ιζ τθατ ναλεαξδιζζεςεξγε> > The string[-index..-1] method does the same thing but I have used Business
> > Basic for over 20 years so my method was easier for me.
>
> In retrospect, I'm surprised I put it so harshly but it doesn't do the
> same thing as the other method.  ¨Βουσομυτιοξ ςερυιςεσ τθατ ωολξοχ θο> long a tail you need.  ¨Βζ¬ ιξστεαδ¬ ωολξοχ θονυγθ οζ τθθεαδ ωοξεεδ
> to remove but don't know or care how long the tail is, your method is
> insufficient...

The you can still do string[len..-1] or string.slice(len..-1) and do
not have to repeat the length.  I don't really understand what all the
fuzz is about.  You can get at the information you need and it's not
even difficult.  It's just not that there is an explicit method which
accepts a single parameter for the length which retrieves said portion
of the beginning or end.

The reason why there is probably not a #left or #right in String is
that often string manipulation is done via regular expressions anyway
instead of via indexes.  Personally I find solutions like s[/\w+\z/]
very elegant.

Kind regards

robert