Difference between revisions of "Manuals/calci/LEFTB"
Jump to navigation
Jump to search
(Created page with "<div id="6SpaceContent" class="zcontent" align="left"> '''LEFTB'''(Text, Number_chars) where, '''Text''' - is the text string to extract. '''Number_chars''' - re...") |
|||
| Line 1: | Line 1: | ||
| − | + | =LEFTB(Text, Number_bytes)= | |
| − | ''' | + | where, |
| + | *'''Text''' is a text string containing characters to extract, | ||
| + | *'''Number_bytes''' represents the number of characters to be extracted. | ||
| − | + | LEFTB() displays the characters from a text string, depending on specified number of bytes. | |
| − | + | == Description == | |
| − | + | LEFTB(Text, Number_bytes) | |
| − | + | e.g. LEFTB("String",2) displays '''St''' as a result. | |
| − | |||
| − | |||
| − | LEFTB | + | *LEFTB counts 2 bytes per character when system is set to language supporting DBCS, else counts 1 byte per character. |
| + | *LEFTB works with the languages that use 'Double Byte Character Set' (DBCS). | ||
| + | *'''Text''' can be any string containing characters, numbers, symbols, blankspaces etc. | ||
| + | *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 >0. | ||
| + | *If '''Number_bytes''' >'length of text', Calci displays the entire text. | ||
| + | *If '''Number_bytes''' is omitted, Calci assumes it to be 1. | ||
| − | + | == Examples == | |
| − | |||
| − | |||
| − | + | Consider the following examples as input to LEFTB() function. | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
<div id="2SpaceContent" class="zcontent" align="left"> | <div id="2SpaceContent" class="zcontent" align="left"> | ||
{| id="TABLE3" class="SpreadSheet blue" | {| id="TABLE3" class="SpreadSheet blue" | ||
| − | |||
|- class="even" | |- class="even" | ||
| + | | class="sshl_f" |<#!#> | ||
| + | | class=" " | | ||
| class=" " | | | class=" " | | ||
| − | + | ||
| − | |||
| − | |||
| − | |||
|- class="odd" | |- class="odd" | ||
| − | | class=" " | | + | | class="sshl_f" |JOHN SMITH |
| − | | class=" " | | + | | class=" " | |
| − | | | + | | class=" " | |
| − | | | + | |
| − | |||
|- class="even" | |- class="even" | ||
| − | | class=" | + | | class="sshl_f" |123*123 |
| − | | class=" | + | | class=" " | |
| − | | | + | | class=" " | |
| − | | | + | |
| − | |||
|- class="odd" | |- class="odd" | ||
| − | + | | class="sshl_f" | | |
| − | + | | class=" " | | |
| − | + | | class=" " | | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | | class="sshl_f" | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | | | ||
| − | | | ||
| − | |||
| − | | | ||
| − | | class=" | ||
| − | |||
| − | |||
| − | | | ||
|} | |} | ||
| − | + | =LEFTB(A1,4) : Displays first 4 characters in a string from cell A1. Displays '''<#!#''' as the output. | |
| − | + | =LEFTB(A2,5) : Displays first 5 characters in a string from cell A2. Displays '''JOHN ''' as the output. Space Character is also counted. | |
| − | + | =LEFTB(A2) : Displays first character '''J''' in a string from cell A2 as the output. | |
| − | + | =LEFTB(A3,4) : Displays first 4 characters in a string from cell A3. Displays '''123*''' as the output. | |
| − | + | =LEFTB("Good Morning",20) :Displays the full text string '''Good Morning''' as the output. | |
| − | + | ||
| − | + | <font color ="Red">Need to give examples with characters/language supporting DBCS </font> | |
| − | + | == See Also == | |
| − | + | ||
| − | + | *[[Manuals/calci/LEFT | LEFT]] | |
| − | + | ||
| − | + | == References == | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | [[ | ||
| − | | | ||
| − | |||
| − | |||
| − | |||
| − | + | *[http://en.wikipedia.org/wiki/String_(computer_science) String] | |
| − | |||
Revision as of 16:10, 27 January 2014
LEFTB(Text, Number_bytes)
where,
- Text is a text string containing characters to extract,
- Number_bytes represents the number of characters to be extracted.
LEFTB() displays the characters from a text string, depending on specified number of bytes.
Description
LEFTB(Text, Number_bytes)
e.g. LEFTB("String",2) displays St as a result.
- LEFTB counts 2 bytes per character when system is set to language supporting DBCS, else counts 1 byte per character.
- LEFTB works with the languages that use 'Double Byte Character Set' (DBCS).
- Text can be any string containing characters, numbers, symbols, blankspaces etc.
- 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 >0.
- If Number_bytes >'length of text', Calci displays the entire text.
- If Number_bytes is omitted, Calci assumes it to be 1.
Examples
Consider the following examples as input to LEFTB() function.
| <#!#> | ||
| JOHN SMITH | ||
| 123*123 | ||
=LEFTB(A1,4) : Displays first 4 characters in a string from cell A1. Displays <#!# as the output.
=LEFTB(A2,5) : Displays first 5 characters in a string from cell A2. Displays JOHN as the output. Space Character is also counted.
=LEFTB(A2) : Displays first character J in a string from cell A2 as the output.
=LEFTB(A3,4) : Displays first 4 characters in a string from cell A3. Displays 123* as the output.
=LEFTB("Good Morning",20) :Displays the full text string Good Morning as the output.
Need to give examples with characters/language supporting DBCS