The JavaScript substr method is not part of the core JavaScript language and is not recommended to use. In this project I define substr using the standard substring method. There are 2 versions.