NetBeansв„ў IDE Field Guide: Developing Desktop, Web, Enterprise, and Mobile Applications (2nd Edition)

The translate() function substitutes characters in a supplied string with nominated replacement characters. It can also be used to remove nominated characters from a string. For example, the result of «translate('ABC-123', '-'/') » is the string «ABC/123 » .

Argument

Data Type

Meaning

value

xs:string?

The supplied string

from

xs:string

The list of characters to be replaced

to

xs:string

The list of replacement characters

Result

xs:string?

A string derived from the supplied string, but with those characters that appear in the second argument replaced by the corresponding characters from the third argument, or removed if there is no corresponding character

Категории