Difference between revisions of "Manuals/calci/RIGHTB"

From ZCubes Wiki
Jump to navigation Jump to search
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
=RIGHTB(Text, Number_bytes)=
+
<div style="font-size:30px">'''RIGHTB (Text,Number_chars)'''</div><br/>
 
 
 
where,  
 
where,  
 
*'''Text''' is a text string containing characters to extract,
 
*'''Text''' is a text string containing characters to extract,
*'''Number_bytes''' represents the number of characters to be extracted.
+
*'''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() displays the last character or characters from a text string, depending on specified number of bytes.
 
  
 
== Description ==
 
== Description ==
  
RIGHTB(Text, Number_bytes)
+
RIGHTB (Text,Number_chars)
 
 
 
e.g. RIGHTB("String123",3) displays '''123''' as a result.
 
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 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).
 
*RIGHTB works with the languages that use 'Double Byte Character Set' (DBCS).
 
*'''Text''' can be any string containing characters, numbers, symbols, blank spaces etc.
 
*'''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").
 
*If argument '''Text''' is directly entered in the command, it should be enclosed in double quotes (e.g. "Name").
*Argument '''Number_bytes''' indicates the number of byte characters to be displayed from a text string. '''Number_bytes''' should be &gt;0.
+
*Argument '''Number_chars''' indicates the number of byte characters to be displayed from a text string. '''Number_chars''' should be &gt;0.
*If '''Number_bytes''' &gt; 'length of text', Calci displays the entire text.
+
*If '''Number_chars''' &gt; 'length of text', Calci displays the entire text.
*If '''Number_bytes''' is omitted, Calci assumes it to be 1.
+
*If '''Number_chars''' is omitted, Calci assumes it to be 1.
  
 
== Examples ==
 
== Examples ==
Line 66: Line 62:
  
 
*[http://en.wikipedia.org/wiki/String_(computer_science) String]
 
*[http://en.wikipedia.org/wiki/String_(computer_science) String]
 +
 +
 +
 +
 +
*[[Z_API_Functions | List of Main Z Functions]]
 +
 +
*[[ 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