55.7 INDEX_OF Function Signature 1
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 apex_t_varchar2,
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.
BEGIN
sys.dbms_output.put_line (
apex_string.index_of (
p_table => apex_t_varchar2 (
'Dog',
'Cat',
'Capybara' ),
p_value => 'Capybara' ) );
END;
-> 3
Parent topic: APEX_STRING