49.28 STRING_TO_TABLE Function

This function returns the split input at separator, returning a vc_arr2.

Syntax

FUNCTION STRING_TO_TABLE (
    p_str   IN VARCHAR2,
    p_sep   IN VARCHAR2 DEFAULT ':' )
    RETURN apex_application_global.vc_arr2;

Parameters

Table 49-30 STRING_TO_TABLE Parameters

Parameters Description
p_str The input varchar2.
p_sep The separator, no regexp or split at char. Defaults to ':'.

Example

DECLARE
    l_result apex_application_global.vc_arr2;
BEGIN
    l_result := apex_string.string_to_table('1:2:3',':');
    sys.dbms_output.put_line(apex_string.table_to_string(l_result,'-'));
END;
-> 1-2-3