Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space DEV and version r097

D toc

Excerpt

Generates the Unicode index value for the first character of the input string.

  • Unicode is a digital standard for the consistent encoding of the world's writing systems, so that representation of character sets is consistent around the world. 
  • The first 256 Unicode characters (0, 255) correspond to the ASCII character set.
  • If the function cannot resolve a Unicode character from the first character, it returns a null value. 

D s lang vs sql

D s
snippetBasic

Column reference example:

D lang syntax
RawWrangletrue
Typeref
showNotetrue
WrangleTextderive type:single value:unicode(MyChar)

unicode(MyChar)

Output: Returns Unicode index value for the first character in the MyChar column. 

String literal example:

D lang syntax
RawWrangletrue
Typeref
showNotetrue
WrangleTextderive type:single value:unicode('A')

unicode('A')

Output: Returns the integer 65.

D s
snippetSyntax

D lang syntax
RawWrangletrue
Typesyntax
showNotetrue
WrangleTextderive type:single value:unicode(column_string)

unicode(column_string)


ArgumentRequired?Data TypeDescription
column_stringYstringName of the column or string literal the Unicode value of which is generated

D s lang notes

column_string

Name of the column or string literal, the first character of which is converted to its corresponding Unicode value.

Info

NOTE: If the input string contains multiple characters, the first character is mapped to its Unicode value, and the rest are ignored.

  • Missing string or column values generate missing string results.
  • String constants must be quoted ('Hello, World').
  • Multiple columns and wildcards are not supported.

D s
snippetusage

Required?Data TypeExample Value
YesString literal or column referencemyColumn

D s
snippetExamples

Example - char and unicode functions

Include Page
EXAMPLE - UNICODE Function
EXAMPLE - UNICODE Function

D s also
labelstring