UnicodeChar (Unicode function): Difference between revisions
Jump to navigation
Jump to search
m (→Usage notes) |
m (→Usage notes) |
||
Line 19: | Line 19: | ||
<li>The <var class="term">position</var> value must be a non-negative, non-zero number; a zero or negative number results in request cancellation; a value greater than the declared length of the output string results in request cancellation. | <li>The <var class="term">position</var> value must be a non-negative, non-zero number; a zero or negative number results in request cancellation; a value greater than the declared length of the output string results in request cancellation. | ||
<li>For a given <var class="term">position</var>, the <var class="term">UnicodeChar</var> function returns the same value as the <var>[[UnicodeSubstring (Unicode function)|UnicodeSubstring]]</var> function with a length argument of <code>1</code>. | <li>For a given <var class="term">position</var>, the <var class="term">UnicodeChar</var> function returns the same value as the <var>[[UnicodeSubstring (Unicode function)|UnicodeSubstring]]</var> function with a length argument of <code>1</code>. | ||
<li>The <var>UnicodeChar</var> method is analogous to the intrinsic <var>String</var> [[Char (String function)|Char]] function. | <li>The <var>UnicodeChar</var> method is analogous to the intrinsic <var>String</var> <var>[[Char (String function)|Char]]</var> function. | ||
<li><var>UnicodeChar</var> is available as of <var class="product">[[Sirius Mods | <li><var>UnicodeChar</var> is available as of <var class="product">[[Sirius Mods]]</var> Version 7.5. | ||
</ul> | </ul> | ||
Revision as of 20:28, 25 February 2011
The value at a specified position in the input string (Unicode class)
The UnicodeChar function returns the string value of the single character at a specified position in the method object Unicode string.
Syntax
%outUnicode = unicode:UnicodeChar( position)
Syntax terms
%outUnicode | A Unicode variable to receive the result of the UnicodeChar method. |
---|---|
unicode | A Unicode string. |
position | The position in the method object string, unicode, of the character you want to identify. A value of 1 finds the first character in the string. |
Usage notes
- The position value must be a non-negative, non-zero number; a zero or negative number results in request cancellation; a value greater than the declared length of the output string results in request cancellation.
- For a given position, the UnicodeChar function returns the same value as the UnicodeSubstring function with a length argument of
1
. - The UnicodeChar method is analogous to the intrinsic String Char function.
- UnicodeChar is available as of Sirius Mods Version 7.5.
Example
- The following request calls UnicodeChar two times:
begin printText {'inaugural':unicodeChar(5)} %u is unicode initial('xyz¡':U printText {%u:unicodeChar(4)} end
The result is:
g ?
The question mark in the result represents an EBCDIC character that is not displayable.
See also
- the instrinsic String U function