Append the remaining characters of any of the two strings
if ( pntr1 < len1 ) { ans += s1 . Substring ( pntr1 , len1 - pntr1 ) ; } if ( pntr2 < len2 ) { ans += s2 . Substring ( pntr2 , len2 - pntr2 ) ; }