Class SubSequence

java.lang.Object
org.scijava.parsington.SubSequence
All Implemented Interfaces:
CharSequence

public class SubSequence extends Object implements CharSequence
A CharSequence which is a by-reference subsequence of another CharSequence. This is particularly useful for regex matching without excessive string copying.

Surprisingly, core Java does not seem to have this capability (apart from Segment, which seems misplaced in the Swing library); all of String.subSequence(int, int), StringBuffer.subSequence(int, int) and StringBuilder.subSequence(int, int) internally copy the requested string segment.

Author:
Curtis Rueden