Difference between revisions of "Manuals/calci/LEN"
(Created page with "<div id="6SpaceContent" class="zcontent" align="left"><font size="2"><font face="Arial"> <font color="#484848"> </font></font></font> <font color="#484848"><font face="Ari...") |
|||
| (7 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
| − | <div | + | <div style="font-size:30px">'''LEN (Text) '''</div><br/> |
| + | *where, <math>Text</math> is a text string whose length is to be determined. | ||
| + | **LEN(), returns the number of characters in a text string. | ||
| − | + | == Description == | |
| − | + | LEN(txt) | |
| − | |||
| − | |||
| − | + | e.g. LEN (Text) displays '''6''' as a result. | |
| − | < | + | *LEN() counts 1 byte per character. LEN() works with the languages that use 'Single Byte Character Set' (SBCS). |
| + | *<math>Text</math> can be any string containing characters, numbers, symbols, blank space etc. | ||
| + | *If argument <math>Text</math> is directly entered in the command, it should be enclosed in double quotes (e.g. "Name"). | ||
| − | + | == Examples == | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
<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" |Wel-Come | ||
| + | | class=" " | | ||
| class=" " | | | class=" " | | ||
| − | + | ||
| − | |||
| − | |||
| − | |||
|- class="odd" | |- class="odd" | ||
| − | | class=" " | | + | | class="sshl_f" |Apple Orange |
| − | | class=" | + | | class=" " | |
| − | | class=" | + | | class=" " | |
| − | | | + | |
| − | |||
|- class="even" | |- class="even" | ||
| − | | class=" | + | | class="sshl_f" |123*123 |
| − | | class=" | + | | class=" " | |
| − | | class=" | + | | class=" " | |
| − | + | ||
| − | | | ||
| − | |||
|- class="odd" | |- class="odd" | ||
| − | + | | class="sshl_f" | | |
| − | | class=" | + | | class=" " | |
| − | + | | class=" " | | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | | | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | | | ||
| − | | | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | | | ||
|} | |} | ||
| − | < | + | =LEN(A1) : Calculates the number of characters in a string referenced to cell A1. <br>Displays '''8''' as the output. Character '-' is also counted. |
| − | + | =LEN(A2) : Calculates the number of characters in a string referenced to cell A2. <br>Displays '''12''' as the output. Space Character is also counted. | |
| + | =LEN(A3) : Calculates the number of characters in a string referenced to cell A3. <br>Displays '''7''' as the output. | ||
| + | =LEN("<!#!>") :Displays '''5''' as the output. | ||
| + | =LEN(A1&A2) : Adds the character length of two strings referenced to cells A1 and A2. <br>Displays '''20''' as the output. | ||
| + | =LEN(A3&"123") : Adds the character length of two strings referenced to cell A1 and "123". <br>Displays '''10''' as the output. | ||
| + | |||
| + | ==Related Videos== | ||
| + | |||
| + | {{#ev:youtube|BI1otcs3nJE|280|center|LEN function}} | ||
| + | |||
| + | == See Also == | ||
| + | |||
| + | *[[Manuals/calci/LENB | LENB]] | ||
| + | |||
| + | == References == | ||
| + | |||
| + | *[http://en.wikipedia.org/wiki/String_(computer_science) String] | ||
| + | *[http://en.wikipedia.org/wiki/SBCS Single-byte Character Set] | ||
| + | |||
| + | |||
| + | *[[Z_API_Functions | List of Main Z Functions]] | ||
| + | |||
| + | *[[ Z3 | Z3 home ]] | ||
Latest revision as of 15:07, 13 August 2018
LEN (Text)
- where, is a text string whose length is to be determined.
- LEN(), returns the number of characters in a text string.
Description
LEN(txt)
e.g. LEN (Text) displays 6 as a result.
- LEN() counts 1 byte per character. LEN() works with the languages that use 'Single Byte Character Set' (SBCS).
- can be any string containing characters, numbers, symbols, blank space etc.
- If argument is directly entered in the command, it should be enclosed in double quotes (e.g. "Name").
Examples
| Wel-Come | ||
| Apple Orange | ||
| 123*123 | ||
=LEN(A1) : Calculates the number of characters in a string referenced to cell A1.
Displays 8 as the output. Character '-' is also counted. =LEN(A2) : Calculates the number of characters in a string referenced to cell A2.
Displays 12 as the output. Space Character is also counted. =LEN(A3) : Calculates the number of characters in a string referenced to cell A3.
Displays 7 as the output. =LEN("<!#!>") :Displays 5 as the output. =LEN(A1&A2) : Adds the character length of two strings referenced to cells A1 and A2.
Displays 20 as the output. =LEN(A3&"123") : Adds the character length of two strings referenced to cell A1 and "123".
Displays 10 as the output.
Related Videos
See Also
References