Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • Yes, Java's substring is sub-optimal. You have to grab a library like Apache's Commons Lang to pick up a class called StringUtils, which has a substring method that works as you hope, plus it supports negative subscripting.

    The StringUtils class contains a bunch of other methods that make working with Strings less painful as well.