This function behaves exactly like getFirstConsumedCharAfter but it also tracks what elements contribute to the result.
This function behaves exactly like getFirstConsumedCharAfter but it also tracks what elements contribute to the result.