rindex takes char pointer, not char