Difference between revisions of "Manuals/calci/RIGHTB"

From ZCubes Wiki
Jump to navigation Jump to search
(Created page with "<div id="6SpaceContent" class="zcontent" align="left"> '''RIGHTB'''(Text, Number_chars) where, '''Text''' - is the text string to extract. '''Number_chars''' - r...")
 
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<div id="6SpaceContent" class="zcontent" align="left">
+
<div style="font-size:30px">'''RIGHTB (Text,Number_chars)'''</div><br/>
 +
where,
 +
*'''Text''' is a text string containing characters to extract,
 +
*'''Number_chars''' represents the number of characters to be extracted.
 +
**RIGHTB(), returns the rightmost characters from a text value.RIGHTB is intended for use with languages that use the double-byte character set (DBCS).
  
'''RIGHTB'''(Text, Number_chars)
+
== Description ==
  
where,
+
RIGHTB (Text,Number_chars)
 +
e.g. RIGHTB("String123",3) displays '''123''' as a result.
 +
*RIGHTB counts 2 bytes per character when system is set to language supporting DBCS, else counts 1 byte per character.
 +
*RIGHTB works with the languages that use 'Double Byte Character Set' (DBCS).
 +
*'''Text''' can be any string containing characters, numbers, symbols, blank spaces etc.
 +
*If argument '''Text''' is directly entered in the command, it should be enclosed in double quotes (e.g. "Name").
 +
*Argument '''Number_chars''' indicates the number of byte characters to be displayed from a text string. '''Number_chars''' should be &gt;0.
 +
*If '''Number_chars''' &gt; 'length of text', Calci displays the entire text.
 +
*If '''Number_chars''' is omitted, Calci assumes it to be 1.
  
'''Text''' - is the text string to extract.
+
== Examples ==
  
'''Number_chars''' - represents the number of charcaters you want RIGHT to extract.
+
Consider the following examples as input to RIGHTB() function.
  
</div>
 
----
 
<div id="1SpaceContent" class="zcontent" align="left">
 
 
RIGHTB returns the first character or characters in a text string, based on the number of bytes you specify. RIGHTB is intended for use with languages that use the double-byte character set (DBCS).
 
 
</div>
 
----
 
<div id="7SpaceContent" class="zcontent" align="left">
 
 
If Number_chars &lt;= 0,RIGHTB returns #ERROR.
 
 
If Number_chars &gt; length of text, it returns all of text.
 
 
If Number_chars is omitted, it is considered as 1.
 
 
</div>
 
----
 
<div id="12SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="left">
 
 
RIGHTB
 
 
</div></div>
 
----
 
<div id="8SpaceContent" class="zcontent" align="left">
 
 
Lets see an example in (Column1, Row2)
 
 
<nowiki>=RIGHTB(R1C1,2)</nowiki>
 
 
RIGHTB returns TH.
 
 
Lets see an another example in (Column1,Row3)
 
 
<nowiki>=RIGHTB(R1C1)</nowiki>
 
 
RIGHTB returns H(if omitted,considered as 1).
 
 
Consider an example in (Column1, Row4)
 
 
<nowiki>=RIGHTB(R1C1,20)</nowiki>
 
 
RIGHTB returns JOHN SMITH(Number_chars&gt; length of text).
 
 
</div>
 
----
 
<div id="10SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify">Syntax </div><div class="ZEditBox"><center></center></div></div>
 
----
 
<div id="4SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify">Remarks </div></div>
 
----
 
<div id="3SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify">Examples </div></div>
 
----
 
<div id="11SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify">Description </div></div>
 
----
 
 
<div id="2SpaceContent" class="zcontent" align="left">
 
<div id="2SpaceContent" class="zcontent" align="left">
  
 
{| id="TABLE3" class="SpreadSheet blue"
 
{| id="TABLE3" class="SpreadSheet blue"
|+ Default Calci
 
 
|- class="even"
 
|- class="even"
| class=" " |
+
| class="sshl_f" |<#!#>
| Column1
 
| Column2
 
| Column3
 
| Column4
 
|- class="odd"
 
| class=" " | Row1
 
| JOHN SMITH
 
| class="                                                      " |
 
| class=" " |
 
| class=" " |
 
|- class="even"
 
| class="  " | Row2
 
| class="sshl_f" | TH
 
| class=" " |
 
 
| class=" " |
 
| class=" " |
 
| class=" " |
 
| class=" " |
 +
 
|- class="odd"
 
|- class="odd"
| Row3
+
| class="sshl_f" |JOHN SMITH
| class="sshl_f" | H
 
| class="    " |
 
 
| class=" " |
 
| class=" " |
 
| class=" " |
 
| class=" " |
 +
 
|- class="even"
 
|- class="even"
| Row4
+
| class="sshl_f" |123*123
| class="sshl_f" | JOHN SMITH
 
| class=" " |
 
 
| class=" " |
 
| class=" " |
 
| class=" " |
 
| class=" " |
 +
 
|- class="odd"
 
|- class="odd"
| class=" " | Row5
+
| class="sshl_f" |  
| class="                    SelectTD1 ChangeBGColor SelectTD1" |
 
<div id="2Space_Handle" class="zhandles" title="Click and Drag to resize CALCI Column/Row/Cell. It is EZ!"></div><div id="2Space_Copy" class="zhandles" title="Click and Drag over to AutoFill other cells."></div><div id="2Space_Drag" class="zhandles" title="Click and Drag to Move/Copy Area.">[[Image:copy-cube.gif]]  </div>
 
| class="    " |
 
| class=" " |
 
| class=" " |
 
|- class="even"
 
| Row6
 
|
 
| class="    " |
 
 
| class=" " |
 
| class=" " |
 
| class=" " |
 
| class=" " |
 
|}
 
|}
  
{| id="TABLE3_menu"
+
=RIGHTB(A1,4) : Displays last 4 characters in a string from cell A1. Displays '''#!#>''' as the output.
| align="right" | TABLE3
+
=RIGHTB(A2,6) : Displays last 6 characters in a string from cell A2. Displays ''' SMITH''' as the output. <br />Space Character is also counted.
| <span align="left">[[Image:calci1.gif]]</span>
+
=RIGHTB(A3) : Displays last character in a string from cell A3. Displays '''3''' as the output.
|
+
=RIGHTB("Good Morning",20) :Displays the full text string '''Good Morning''' as the output.
|
+
 
[[Image:bold.gif]]
+
<font color ="Red">Need to give examples with characters/language supporting DBCS </font>
|
+
==Related Videos==
[[Image:italic.gif]]
+
 
|
+
{{#ev:youtube|cBk20ZZ6A9s|280|center|RIGHT}}
[[Image:normal.gif]]
+
 
|
+
== See Also ==
[[Image:underline.gif]]
+
 
|
+
*[[Manuals/calci/RIGHT | RIGHT]]
[[Image:border.gif]]
+
 
|
+
== References ==
[[Image:numbers.gif]]
+
 
|
+
*[http://en.wikipedia.org/wiki/String_(computer_science) String]
[[Image:sort.gif]]
+
 
|
+
 
[[Image:formatcells.gif]]
+
 
|
+
 
[[Image:graphs.gif]]
+
*[[Z_API_Functions | List of Main Z Functions]]
| $
 
|}
 
  
</div>
+
*[[ Z3 |  Z3 home ]]
----
 

Latest revision as of 17:36, 13 August 2018

RIGHTB (Text,Number_chars)


where,

  • Text is a text string containing characters to extract,
  • Number_chars represents the number of characters to be extracted.
    • RIGHTB(), returns the rightmost characters from a text value.RIGHTB is intended for use with languages that use the double-byte character set (DBCS).

Description

RIGHTB (Text,Number_chars) e.g. RIGHTB("String123",3) displays 123 as a result.

  • RIGHTB counts 2 bytes per character when system is set to language supporting DBCS, else counts 1 byte per character.
  • RIGHTB works with the languages that use 'Double Byte Character Set' (DBCS).
  • Text can be any string containing characters, numbers, symbols, blank spaces etc.
  • If argument Text is directly entered in the command, it should be enclosed in double quotes (e.g. "Name").
  • Argument Number_chars indicates the number of byte characters to be displayed from a text string. Number_chars should be >0.
  • If Number_chars > 'length of text', Calci displays the entire text.
  • If Number_chars is omitted, Calci assumes it to be 1.

Examples

Consider the following examples as input to RIGHTB() function.

<#!#>
JOHN SMITH
123*123
=RIGHTB(A1,4) : Displays last 4 characters in a string from cell A1. Displays #!#> as the output. 
=RIGHTB(A2,6) : Displays last 6 characters in a string from cell A2. Displays  SMITH as the output. 
Space Character is also counted. =RIGHTB(A3) : Displays last character in a string from cell A3. Displays 3 as the output. =RIGHTB("Good Morning",20) :Displays the full text string Good Morning as the output.

Need to give examples with characters/language supporting DBCS

Related Videos

RIGHT

See Also

References