NEXT_CHUNK Function
This function reads a fixed-length string from a clob. This is just a small wrapper around DBMS_LOB.READ, however it prevents  common errors when incrementing the offset and picking the maximum chunk size.
                  
Syntax
function next_chunk (
    p_str    in            clob,
    p_chunk  out           nocopy varchar2,
    p_offset in out nocopy pls_integer,
    p_amount in            pls_integer default 8191 )
    return boolean;     Parameters
Table 32-9 NEXT_CHUNK Function Parameters
| Parameters | Description | 
|---|---|
| 
 | The input clob. | 
| 
 | The chunk value (in/out). | 
| 
 | The position in  | 
| 
 | The amount of characters that should be read (default 8191). | 
Returns
True if another chunk could be read. False if reading past the end of p_str.
                  
Example
Print chunks of 25 bytes of the input clob.
declare
    l_input  clob := 'The quick brown fox jumps over the lazy dog';
    l_offset pls_integer;
    l_chunk  varchar2(20);
begin
    while apex_string.next_chunk (
              p_str    => l_input,
              p_chunk  => l_chunk,
              p_offset => l_offset,
              p_amount => 20 )
    loop
       sys.dbms_output.put_line(l_chunk);
    end loop;
end;
Output:
  The quick brown fox
  jumps over the lazy
  dog                   Parent topic: APEX_STRING