test for trim and indexof