csubstr is a command in the TclX package.
Return a substring of string that starts at firstExpr and contains lengthExpr characters.
See also crange and consider using string range.