JAL-1853 refactor clip routine from getSequenceStrings