Unicode methods syntax: Difference between revisions
m (Automatically generated page update) |
m (Automatically generated page update) |
||
Line 2: | Line 2: | ||
replaced, so any manual edits will be lost. You've been warned. --> | replaced, so any manual edits will be lost. You've been warned. --> | ||
{{Template:Syntax list header|class=Unicode}} | {{Template:Syntax list header|class=Unicode}} | ||
<p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top:1px solid;"><span class="term">% | <p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top:1px solid;"><span class="term">%outUnicode</span><span class="literal"> =</span> <span class="term">unicode</span><span class="literal">:[[UnicodeChar (Unicode function)|UnicodeChar]]</span><span class="literal">(</span> <span class="term" title="Number">position</span><span class="literal">)</span></p> | ||
<p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="term">% | <p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="term">%outUnicode</span><span class="literal"> =</span> <span class="term">unicode</span><span class="literal">:[[UnicodeLeft (Unicode function)|UnicodeLeft]]</span><span class="literal">(</span> <span class="term" title="Number">number</span><span class="comma">,</span> <span class="squareb">[</span><span class="literal" title="C">Pad=</span> <span class="term" title="C">c</span><span class="squareb">]</span><span class="literal">)</span></p> | ||
<p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="term">%number</span><span class="literal">=</span> <span class="term">unicode</span><span class="literal">:[[UnicodeLength (Unicode function)|UnicodeLength]]</span></p> | <p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="term">%number</span><span class="literal"> =</span> <span class="term">unicode</span><span class="literal">:[[UnicodeLength (Unicode function)|UnicodeLength]]</span></p> | ||
<p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="term">%number</span><span class="literal">=</span> <span class="term">unicode</span><span class="literal">:[[UnicodePositionIn (Unicode function)|UnicodePositionIn]]</span><span class="literal">(</span> <span class="term" title="String">string</span><span class="comma">,</span> <span class="squareb">[</span><span class="literal" title="Number">Start=</span> <span class="term" title="Number">number</span><span class="squareb">]</span><span class="literal">)</span></p> | <p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="term">%number</span><span class="literal"> =</span> <span class="term">unicode</span><span class="literal">:[[UnicodePositionIn (Unicode function)|UnicodePositionIn]]</span><span class="literal">(</span> <span class="term" title="String">string</span><span class="comma">,</span> <span class="squareb">[</span><span class="literal" title="Number">Start=</span> <span class="term" title="Number">number</span><span class="squareb">]</span><span class="literal">)</span></p> | ||
<p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="term">%number</span><span class="literal">=</span> <span class="term">unicode</span><span class="literal">:[[UnicodePositionOf (Unicode function)|UnicodePositionOf]]</span><span class="literal">(</span> <span class="term" title="String">string</span><span class="comma">,</span> <span class="squareb">[</span><span class="literal" title="Number">Start=</span> <span class="term" title="Number">number</span><span class="squareb">]</span><span class="literal">)</span></p> | <p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="term">%number</span><span class="literal"> =</span> <span class="term">unicode</span><span class="literal">:[[UnicodePositionOf (Unicode function)|UnicodePositionOf]]</span><span class="literal">(</span> <span class="term" title="String">string</span><span class="comma">,</span> <span class="squareb">[</span><span class="literal" title="Number">Start=</span> <span class="term" title="Number">number</span><span class="squareb">]</span><span class="literal">)</span></p> | ||
<p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="term">%number</span><span class="literal">=</span> <span class="term">unicode</span><span class="literal">:[[UnicodeRegexMatch (Unicode function)|UnicodeRegexMatch]]</span><span class="literal">(</span> <span class="term" title="Unicode">unicode</span><span class="comma">,</span> <span class="squareb">[</span><span class="literal" title="String">Options=</span> <span class="term" title="String">string</span><span class="squareb">]</span><span class="comma">,</span> | <p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="term">%number</span><span class="literal"> =</span> <span class="term">unicode</span><span class="literal">:[[UnicodeRegexMatch (Unicode function)|UnicodeRegexMatch]]</span><span class="literal">(</span> <span class="term" title="Unicode">unicode</span><span class="comma">,</span> <span class="squareb">[</span><span class="literal" title="String">Options=</span> <span class="term" title="String">string</span><span class="squareb">]</span><span class="comma">,</span> - | ||
<span class="squareb">[</span><span class="literal" title="Stringlist">CaptureList=</span> <span class="term" title="Stringlist">stringlist</span><span class="squareb">]</span><span class="literal">)</span></p> | |||
<p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="term">% | <p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="term">%outUnicode</span><span class="literal"> =</span> <span class="term">unicode</span><span class="literal">:[[UnicodeRegexReplace (Unicode function)|UnicodeRegexReplace]]</span><span class="literal">(</span> <span class="term" title="Unicode">unicode</span><span class="comma">,</span> <span class="term" title="Unicode">unicode</span><span class="comma">,</span> - | ||
<p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="term">% | <span class="squareb">[</span><span class="literal" title="String">Options=</span> <span class="term" title="String">string</span><span class="squareb">]</span><span class="literal">)</span></p> | ||
<p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="term">% | <p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="term">%outUnicode</span><span class="literal"> =</span> <span class="term">unicode</span><span class="literal">:[[UnicodeReplace (Unicode function)|UnicodeReplace]]</span></p> | ||
<p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="term">% | <p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="term">%outUnicode</span><span class="literal"> =</span> <span class="term">unicode</span><span class="literal">:[[UnicodeRight (Unicode function)|UnicodeRight]]</span><span class="literal">(</span> <span class="term" title="Number">number</span><span class="comma">,</span> <span class="squareb">[</span><span class="literal" title="C">Pad=</span> <span class="term" title="C">c</span><span class="squareb">]</span><span class="literal">)</span></p> | ||
<p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="term">%string</span><span class="literal">=</span> <span class="term">unicode</span><span class="literal">:[[UnicodeToEbcdic (Unicode function)|UnicodeToEbcdic]]</span><span class="squareb">[</span><span class="literal">(</span> <span class="squareb">[</span><span class="literal" title="Boolean">CharacterEncode=</span> <span class="term" title="Boolean">boolean</span><span class="squareb">]</span><span class="literal">)</span><span class="squareb">]</span></p> | <p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="term">%outUnicode</span><span class="literal"> =</span> <span class="term">unicode</span><span class="literal">:[[UnicodeSubstring (Unicode function)|UnicodeSubstring]]</span><span class="literal">(</span> <span class="term" title="Number">number</span><span class="comma">,</span> <span class="squareb">[</span><span class="term" title="Number">number</span><span class="squareb">]</span><span class="comma">,</span> <span class="squareb">[</span><span class="literal" title="C">Pad=</span> <span class="term" title="C">c</span><span class="squareb">]</span><span class="literal">)</span></p> | ||
<p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="term">% | <p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="term">%string</span><span class="literal"> =</span> <span class="term">unicode</span><span class="literal">:[[UnicodeToEbcdic (Unicode function)|UnicodeToEbcdic]]</span><span class="squareb">[</span><span class="literal">(</span> <span class="squareb">[</span><span class="literal" title="Boolean">CharacterEncode=</span> <span class="term" title="Boolean">boolean</span><span class="squareb">]</span><span class="literal">)</span><span class="squareb">]</span></p> | ||
<p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="term">% | <p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="term">%outUnicode</span><span class="literal"> =</span> <span class="term">unicode</span><span class="literal">:[[UnicodeToLower (Unicode function)|UnicodeToLower]]</span></p> | ||
<p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="term">%string</span><span class="literal">=</span> <span class="term">unicode</span><span class="literal">:[[UnicodeToUtf16 (Unicode function)|UnicodeToUtf16]]</span><span class="squareb">[</span><span class="literal">(</span> <span class="squareb">[</span><span class="literal" title="Boolean">InsertBOM=</span> <span class="term" title="Boolean">boolean</span><span class="squareb">]</span><span class="literal">)</span><span class="squareb">]</span></p> | <p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="term">%outUnicode</span><span class="literal"> =</span> <span class="term">unicode</span><span class="literal">:[[UnicodeToUpper (Unicode function)|UnicodeToUpper]]</span></p> | ||
<p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="term">%string</span><span class="literal">=</span> <span class="term">unicode</span><span class="literal">:[[UnicodeToUtf16Hex (Unicode function)|UnicodeToUtf16Hex]]</span></p> | <p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="term">%string</span><span class="literal"> =</span> <span class="term">unicode</span><span class="literal">:[[UnicodeToUtf16 (Unicode function)|UnicodeToUtf16]]</span><span class="squareb">[</span><span class="literal">(</span> <span class="squareb">[</span><span class="literal" title="Boolean">InsertBOM=</span> <span class="term" title="Boolean">boolean</span><span class="squareb">]</span><span class="literal">)</span><span class="squareb">]</span></p> | ||
<p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="term">%string</span><span class="literal">=</span> <span class="term">unicode</span><span class="literal">:[[UnicodeToUtf8 (Unicode function)|UnicodeToUtf8]]</span><span class="squareb">[</span><span class="literal">(</span> <span class="squareb">[</span><span class="literal" title="Boolean">InsertBOM=</span> <span class="term" title="Boolean">boolean</span><span class="squareb">]</span><span class="literal">)</span><span class="squareb">]</span></p> | <p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="term">%string</span><span class="literal"> =</span> <span class="term">unicode</span><span class="literal">:[[UnicodeToUtf16Hex (Unicode function)|UnicodeToUtf16Hex]]</span></p> | ||
<p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="term">%string</span><span class="literal">=</span> <span class="term">unicode</span><span class="literal">:[[UnicodeToUtf8Hex (Unicode function)|UnicodeToUtf8Hex]]</span></p> | <p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="term">%string</span><span class="literal"> =</span> <span class="term">unicode</span><span class="literal">:[[UnicodeToUtf8 (Unicode function)|UnicodeToUtf8]]</span><span class="squareb">[</span><span class="literal">(</span> <span class="squareb">[</span><span class="literal" title="Boolean">InsertBOM=</span> <span class="term" title="Boolean">boolean</span><span class="squareb">]</span><span class="literal">)</span><span class="squareb">]</span></p> | ||
<p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="term">%number</span><span class="literal">=</span> <span class="term">unicode</span><span class="literal">:[[UnicodeUntranslatablePosition (Unicode function)|UnicodeUntranslatablePosition]]</span></p> | <p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="term">%string</span><span class="literal"> =</span> <span class="term">unicode</span><span class="literal">:[[UnicodeToUtf8Hex (Unicode function)|UnicodeToUtf8Hex]]</span></p> | ||
<p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="term">% | <p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="term">%number</span><span class="literal"> =</span> <span class="term">unicode</span><span class="literal">:[[UnicodeUntranslatablePosition (Unicode function)|UnicodeUntranslatablePosition]]</span></p> | ||
<p class="syntax" style="margin-bottom:0px; border-bottom:1px solid; border-left:1px solid; border-right:1px solid; border-top: none; margin-top:0px;"><span class="term">%outUnicode</span><span class="literal"> =</span> <span class="term">unicode</span><span class="literal">:[[UnicodeWith (Unicode function)|UnicodeWith]]</span><span class="literal">(</span> <span class="term" title="Unicode">unicode</span><span class="literal">)</span></p> |
Revision as of 23:59, 31 January 2011
The syntax for each of the Unicode class methods is shown below.
Square brackets indicate optional elements of the method invocation. See also the notation conventions for methods and the List of Unicode methods.
%outUnicode = unicode:UnicodeChar( position)
%outUnicode = unicode:UnicodeLeft( number, [Pad= c])
%number = unicode:UnicodeLength
%number = unicode:UnicodePositionIn( string, [Start= number])
%number = unicode:UnicodePositionOf( string, [Start= number])
%number = unicode:UnicodeRegexMatch( unicode, [Options= string], - [CaptureList= stringlist])
%outUnicode = unicode:UnicodeRegexReplace( unicode, unicode, - [Options= string])
%outUnicode = unicode:UnicodeReplace
%outUnicode = unicode:UnicodeRight( number, [Pad= c])
%outUnicode = unicode:UnicodeSubstring( number, [number], [Pad= c])
%string = unicode:UnicodeToEbcdic[( [CharacterEncode= boolean])]
%outUnicode = unicode:UnicodeToLower
%outUnicode = unicode:UnicodeToUpper
%string = unicode:UnicodeToUtf16[( [InsertBOM= boolean])]
%string = unicode:UnicodeToUtf16Hex
%string = unicode:UnicodeToUtf8[( [InsertBOM= boolean])]
%string = unicode:UnicodeToUtf8Hex
%number = unicode:UnicodeUntranslatablePosition
%outUnicode = unicode:UnicodeWith( unicode)