Extracts UTF-16 code units using clamped, end-exclusive substring indices. End 0 means the string's end; reversed bounds are swapped.