33.2 GET_INITIALS Function
Get N letter initials from the first N words.
Syntax
GET_INITIALS (
p_str IN VARCHAR2,
p_cnt IN NUMBER DEFAULT 2 )
RETURN VARCHAR2
Parameters
Table 33-2 GET_INITIALS Function Parameters
Parameters | Description |
---|---|
|
The input string. |
|
The N letter initials to get from the first N words. The default is 2. |
Example
Get initials from "John Doe"
.
begin
sys.dbms_output.put_line(apex_string.get_initials('John Doe'));
end;
-> JD
begin
sys.dbms_output.put_line(apex_string.get_initials(p_str => 'Andres Homero Lozano Garza', p_cnt => 3));
end;
-> AHL
Parent topic: APEX_STRING