String methods syntax: Difference between revisions
m (Automatically generated page update) |
m (Automatically generated page update) |
||
Line 36: | Line 36: | ||
<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">string</span><span class="literal">:[[MarksStoreCodeIncrement (String function)|MarksStoreCodeIncrement]]</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">string</span><span class="literal">:[[MarksStoreCodeIncrement (String function)|MarksStoreCodeIncrement]]</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">string</span><span class="literal">:[[MarksStoreCodeToNumber (String function)|MarksStoreCodeToNumber]]</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">string</span><span class="literal">:[[MarksStoreCodeToNumber (String function)|MarksStoreCodeToNumber]]</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">%sl</span><span class="literal">=</span> <span class="term">string</span><span class="literal">:[[ParseLines (String function)|ParseLines]]</span><span class="squareb">[</span><span class="literal">(</span> <span class="squareb">[</span><span class="term" title="String">string</span><span class="squareb">]</span><span class="comma">,</span> <span class="squareb">[</span><span class="literal" title="Boolean">StripTrailingNull=</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">%position</span><span class="literal">=</span> <span class="term">string</span><span class="literal">:[[PositionIn (String function)|PositionIn]]</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">%position</span><span class="literal">=</span> <span class="term">string</span><span class="literal">:[[PositionIn (String function)|PositionIn]]</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">%position</span><span class="literal">=</span> <span class="term">string</span><span class="literal">:[[PositionOf (String function)|PositionOf]]</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">%position</span><span class="literal">=</span> <span class="term">string</span><span class="literal">:[[PositionOf (String function)|PositionOf]]</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> | ||
Line 44: | Line 44: | ||
<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> | <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">%string</span><span class="literal">=</span> <span class="term">string</span><span class="literal">:[[RegexReplace (String function)|RegexReplace]]</span><span class="literal">(</span> <span class="term" title="String">string</span><span class="comma">,</span> <span class="term" title="String">string</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="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">string</span><span class="literal">:[[RegexReplace (String function)|RegexReplace]]</span><span class="literal">(</span> <span class="term" title="String">string</span><span class="comma">,</span> <span class="term" title="String">string</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="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">%sl</span><span class="literal">=</span> <span class="term">string</span><span class="literal">:[[RegexSplit (String function)|RegexSplit]]</span><span class="literal">(</span> <span class="term" title="String">string</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="RegexSplitOutputOptions">Add=</span> <span class="term" title="RegexSplitOutputOptions">regexSplitOutputOptions</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">string</span><span class="literal">:[[Remove (String function)|Remove]]</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">Count=</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">%string</span><span class="literal">=</span> <span class="term">string</span><span class="literal">:[[Remove (String function)|Remove]]</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">Count=</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">%string</span><span class="literal">=</span> <span class="term">string</span><span class="literal">:[[Replace (String function)|Replace]]</span><span class="literal">(</span> <span class="term" title="String">string</span><span class="comma">,</span> <span class="term" title="String">string</span><span class="comma">,</span> <span class="squareb">[</span><span class="literal" title="Number">Count=</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">%string</span><span class="literal">=</span> <span class="term">string</span><span class="literal">:[[Replace (String function)|Replace]]</span><span class="literal">(</span> <span class="term" title="String">string</span><span class="comma">,</span> <span class="term" title="String">string</span><span class="comma">,</span> <span class="squareb">[</span><span class="literal" title="Number">Count=</span> <span class="term" title="Number">number</span><span class="squareb">]</span><span class="literal">)</span></p> | ||
Line 71: | Line 71: | ||
<span class="squareb">[</span><span class="literal" title="Number">MaxChain=</span> <span class="term" title="Number">number</span><span class="squareb">]</span><span class="comma">,</span> <span class="squareb">[</span><span class="literal" title="String">Filename=</span> <span class="term" title="String">string</span><span class="squareb">]</span><span class="comma">,</span> - | <span class="squareb">[</span><span class="literal" title="Number">MaxChain=</span> <span class="term" title="Number">number</span><span class="squareb">]</span><span class="comma">,</span> <span class="squareb">[</span><span class="literal" title="String">Filename=</span> <span class="term" title="String">string</span><span class="squareb">]</span><span class="comma">,</span> - | ||
<span class="squareb">[</span><span class="literal" title="Number">LastModified=</span> <span class="term" title="Number">number</span><span class="squareb">]</span><span class="literal">)</span><span class="squareb">]</span></p> | <span class="squareb">[</span><span class="literal" title="Number">LastModified=</span> <span class="term" title="Number">number</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">%stringTokenizer</span><span class="literal">=</span> <span class="term">string</span><span class="literal">:[[stringTokenizer (String function)|stringTokenizer]]</span><span class="squareb">[</span><span class="literal">(</span> <span class="squareb">[</span><span class="literal" title="String">TokenChars=</span> <span class="term" title="String">string</span><span class="squareb">]</span><span class="comma">,</span> - | ||
<span class="squareb">[</span><span class="literal" title="String">Spaces=</span> <span class="term" title="String">string</span><span class="squareb">]</span><span class="comma">,</span> - | |||
<span class="squareb">[</span><span class="literal" title="String">Quotes=</span> <span class="term" title="String">string</span><span class="squareb">]</span><span class="comma">,</span> - | |||
<span class="squareb">[</span><span class="literal" title="String">Separators=</span> <span class="term" title="String">string</span><span class="squareb">]</span><span class="literal">)</span><span class="squareb">]</span></p> |
Revision as of 19:30, 28 January 2011
The syntax for each of the String 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 String methods.
%string= string:AsciiToEbcdic[( [CharacterEncode= boolean])]
%string= string:Base64ToString
%number= string:BinaryToFloat
%number= string:BinaryToInteger[( [Signed= boolean])]
%result= string:BitAndString( andBits, [Pad= c])
%result= string:BitOffString( offBits, [Pad= c])
%result= string:BitOnString( onBits, [Pad= c])
%result= string:BitOrString( orBits, [Pad= c])
%result= string:BitXorString( xorBits, [Pad= c])
%string= string:Center( length, [Pad= c], [OffsetLeft= boolean])
%string= string:Centre( length, [Pad= c], [OffsetLeft= boolean])
%string= string:Char( position)
%string= string:Deflate[( [FixedCode= boolean], [LazyMatch= boolean], - [MaxChain= number])]
%string= string:EbcdicToAscii[( [CharacterDecode= boolean])]
%unicode= string:EbcdicToUnicode[( [CharacterDecode= boolean], - [Untranslatable= unicode])]
%string= string:Gunzip
%number= string:GunzipDatetimeNS
%string= string:GunzipFilename
%string= string:Gzip[( [FixedCode= boolean], [LazyMatch= boolean], - [MaxChain= number], [Filename= string], - [LastModified= number])]
%number= string:HexToInteger[( [Signed= boolean])]
%string= string:HexToString
%string= string:Inflate
%string= string:Insert( string, position)
%boolean= string:IsOneOf( list)
%string= string:Left( length, [Pad= c])
%length= string:Length
%string= string:MD5digest
%string= string:MarksStoreCodeDecrement
%string= string:MarksStoreCodeIncrement
%number= string:MarksStoreCodeToNumber
%sl= string:ParseLines[( [string], [StripTrailingNull= boolean])]
%position= string:PositionIn( string, [Start= number])
%position= string:PositionOf( string, [Start= number])
%string= string:RC4decrypt( string)
%string= string:RC4encrypt( string)
%number= string:RegexMatch( string, [Options= string], - [CaptureList= stringlist])
%string= string:RegexReplace( string, string, [Options= string])
%sl= string:RegexSplit( string, [Options= string], - [Add= regexSplitOutputOptions])
%string= string:Remove( string, [Count= number])
%string= string:Replace( string, string, [Count= number])
%string= string:Reverse
%string= string:Right( length, [Pad= c])
%string= string:SHAdigest
%string= string:StringToBase64
%days= string:StringToDays( string, [centSpan])
%string= string:StringToHex
%milliseconds= string:StringToMilliseconds( string, [centSpan])
%seconds= string:StringToSeconds( string, [centSpan])
%string= string:Substring( position, [length], [Pad= c])
%string= string:ToLower
%string= string:ToString
%string= string:ToUpper
%string= string:Translate( characterMap)
%unicode= string:U
%string= string:Unspace[( [Spaces= string], [Leading= boolean], - [Trailing= boolean], [Compress= boolean])]
%unicode= string:Utf16ToUnicode[( [AllowUntranslatable= boolean], - [Bom= utf16BOM])]
%unicode= string:Utf8ToUnicode[( [AllowUntranslatable= boolean])]
%string= string:X
%string= string:Zip[( [FixedCode= boolean], [LazyMatch= boolean], - [MaxChain= number], [Filename= string], - [LastModified= number])]
%stringTokenizer= string:stringTokenizer[( [TokenChars= string], - [Spaces= string], - [Quotes= string], - [Separators= string])]