More and more trying. Why substr from C package string is not working?