added String.slice() with Java impl