Added new function for extracting an interval of a simple string.
Added new function for extracting an interval of a general string.