Determine if a string starts/ends with a given character or string