Currently, as far as I know, there are two methods:
1. trim(a) -- only remove spaces around the string
select trim(leading from ' ——11—— ') aa from dual;
select trim(trailing from ' ——11—— ') aa from dual;
select rtrim(' ——11—— ') aa from dual;
select ltrim(' ——11—— ') aa from dual;
select trim('1' from '1xxxxWORLDxxxx1') aaaaa from dual;
2. replace(a,b,c)--remove all spaces in the string
select replace(' aa kk ',' ','') abcd from dual;
select replace('I love my little goddess',' ','') from dual;