54.8 INDEX_OF Function Signature 2
This function returns the first position in the list where p_value
is stored. If not found, returns NULL.
Syntax
APEX_STRING.INDEX_OF (
p_table IN wwv_flow_global.vc_arr2,
p_value IN VARCHAR2 )
RETURN NUMBER;
Parameters
Parameter | Description |
---|---|
p_table |
The table. |
p_value |
Value that is being searched for. |
Returns
Index of the searched value in the table.
Example
The following example prints the index of the given input string in the table.
DECLARE
l_list apex_application_global.vc_arr2;
BEGIN
l_list(1) := 'Dog';
l_list(2) := 'Capybara';
l_list(3) := 'Cat';
sys.dbms_output.put_line (
apex_string.index_of (
p_table => l_list,
p_value => 'Capybara' ) );
END;
-> 3
Parent topic: APEX_STRING