strrange(X)

Returns the unique characters of a given string sorted in ascending order.

Syntax

strrange(X)
bstrrange(X)

Input

Argument Type Description
X text The string on which to apply the function

A scalar value or the name of a column

Return Value

Returns the text value corresponding to the unique characters of X sorted in ascending order.

If X is N/A, then the result is N/A.

Sample Usage

value strrange(value)
'banana' 'abn'

Additional Information

  • strrange is Unicode (UTF-8) compliant and will work with Unicode or plain ASCII text fields. 
  • If passed a string argument that is not legal Unicode, it will by default signal an error (configurable as a user preference). 
  • A corresponding function bstrrange can be used with non-Unicode strings (e.g., binary or legacy encodings).
  • Unicode code-point order (which does not correspond to the lexicographic order used in any particular language) is used for sorting. 
  • Equivalent to strsort(X;'';1;1).