+ 1
This is what Google says "so, you can say that there's adifference between slice() and substr() , while substring() is basically a copy of slice() . if you know the length of characters to be extracted use substr() . He also points out that if the parameters to slice are negative, they reference the string from the end."