while (start_ptr < end_ptr) { start_ptr += UTF8SKIP(start_ptr); len++; } #### PL_utf8_length($chunk) # first iteration PL_utf8_length($chunk . $chunk) # second iteration PL_utf8_length($chunk . $chunk . $chunk) # third iteration ...and so on... #### PL_utf8_length($chunk) # 1st PL_utf8_length($chunk) # 2nd PL_utf8_length($chunk) # 3rd ...