Oracle9i Supplied PL/SQL Packages and Types Reference
Release 1 (9.0.1)

Part Number A89852-02
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to beginning of chapter Go to next page

UTL_RAW , 11 of 22


TRANSLATE Function

This function translates the bytes in the input RAW r according to the bytes in the translation RAWs from_set and to_set. If a byte in r has a matching byte in from_set, then it is replaced by the byte in the corresponding position in to_set, or deleted.

Bytes in r, but undefined in from_set, are copied to the result. Only the first (leftmost) occurrence of a byte in from_set is used. Subsequent duplicates are not scanned and are ignored. If to_set is shorter than from_set, then the extra from_set bytes have no translation correspondence and any bytes in r matching.


Note:

Difference from TRANSLITERATE:

- Translation RAWs have no defaults.

- r bytes undefined in the to_set translation RAW are deleted.

- Result RAW may be shorter than input RAW r.  


Syntax

UTL_RAW.TRANSLATE (
   r        IN RAW,
   from_set IN RAW,
   to_set   IN RAW) 
  RETURN RAW;

Pragmas

pragma restrict_references(translate, WNDS, RNDS, WNPS, RNPS); 

Parameters

Table 80-13 TRANSLATE Function Parameters
Parameter  Description 
r
 

RAW source byte-string to be translated. 

from_set
 

RAW byte-codes to be translated, if present in r

to_set
 

RAW byte-codes to which corresponding from_str bytes are translated. 

Returns

Table 80-14 TRANSLATE Function Returns
Return  Description 
RAW
 

Translated byte-string. 

Errors

Table 80-15 TRANSLATE Function Errors
Error  Description 
VALUE_ERROR
 

Either:

- r is NULL and/or has 0 length

- from_set is NULL and/or has 0 length

- to_set is NULL and/or has 0 length  


Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 1996-2001, Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback