The trim function oracle

 TRIM ( 'character 1' from 'string 2'), a character can be a single character.

1. trim () remove spaces on either side of the string.
2. ltrim () deletes a string of spaces left.
3. rtrim () to remove spaces to the right of the string.
4. trim ( 'character 1' from 'string 2'), respectively, from both sides of the character string 2 starts, to delete a specified character.
5. trim ([leading | trailing | both] trim_char from string) Removes the specified string of characters from a String trim_char.
leading: to start deleting from the head string.
trailing: to start deleting from the end of the string.
borth: delete from both sides of the string.
6. tim () can only remove an en space.

For example:
trim(' tech ') would return 'tech';
trim(' ' from ' tech ') would return 'tech';
trim(leading '0' from '000123') would return '123';
trim(trailing '1' from 'Tech1') would return 'Tech';
trim(both '1' from '123Tech111') would return '23Tech';

Guess you like

Origin www.cnblogs.com/Mellita/p/11286538.html