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