implement substr
Merge pull request #1 from haarg/substr

implement substr