Difference between revisions of "Manuals/calci/MID"
Jump to navigation
Jump to search
(4 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | =MID( | + | <div style="font-size:30px">'''MID (Text,Start_Char,Num_Char)'''</div><br/> |
− | |||
where, | where, | ||
− | *<math> | + | *<math>Text</math> is a text string containing the characters to be extracted, |
− | *<math> | + | *<math>Start-Char</math> is the starting position of the first character to be extracted, and |
− | *<math> | + | *<math>Num-Char</math> represents the number of characters to be displayed. |
− | + | **MID(), returns a specific number of characters from a text string starting at the position you specify. | |
− | MID() | ||
== Description == | == Description == | ||
− | MID( | + | MID (Text,Start_Char,Num_Char) |
− | |||
e.g. MID("String",1,3) displays '''Str''' as a result. | e.g. MID("String",1,3) displays '''Str''' as a result. | ||
− | |||
*MID counts 1 byte per characters. MID works with the languages that use 'Single Byte Character Set' (SBCS). | *MID counts 1 byte per characters. MID works with the languages that use 'Single Byte Character Set' (SBCS). | ||
− | *If argument <math> | + | *If argument <math>Text</math> is directly entered in the command, it should be enclosed in double quotes (e.g. "Name"). |
− | *<math> | + | *<math>Start-Char</math> should be >= 1, else Calci displays #N/A error message. |
− | *If <math> | + | *If <math>Start-Char</math> > 'length of text', Calci displays empty text (""). |
− | *If <math> | + | *If <math>Start-Char</math> + <math>Num-Char</math> > 'length of text', Calci displays the characters up to the end of text. |
− | *If <math> | + | *If <math>Num-Char</math> is negative, Calci displays #N/A error message. |
== Examples == | == Examples == | ||
Line 47: | Line 43: | ||
|} | |} | ||
− | =MID(A1,1,3) : Displays 3 character string in cell A1 starting from 5th position. Displays '''Wel''' as the output. | + | =MID(A1,1,3) : Displays 3 character string in cell A1 starting from 5th position. <br />Displays '''Wel''' as the output. |
− | =MID(A2,7,14) : Displays 14 characters in cell A2 starting from 7th position. Displays '''Orange''' as the output. | + | =MID(A2,7,14) : Displays 14 characters in cell A2 starting from 7th position. <br />Displays '''Orange''' as the output. |
− | =MID(A3,1,1) : Displays character string in cell A3 starting from 1st position. Displays '''*''' as the output. | + | =MID(A3,1,1) : Displays character string in cell A3 starting from 1st position. <br />Displays '''*''' as the output. |
− | =MID("good" & "morning",1,8) : Joins the two strings and returns 8 characters starting from 1st position. Displays '''goodmorn''' as the output. | + | =MID("good" & "morning",1,8) : Joins the two strings and returns 8 characters starting from 1st position. <br />Displays '''goodmorn''' as the output. |
+ | ==Related Videos== | ||
+ | |||
+ | {{#ev:youtube|6uxeKVfA8JQ|280|center|MID}} | ||
+ | |||
== See Also == | == See Also == | ||
Line 59: | Line 59: | ||
*[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 15:18, 13 August 2018
MID (Text,Start_Char,Num_Char)
where,
- is a text string containing the characters to be extracted,
- is the starting position of the first character to be extracted, and
- represents the number of characters to be displayed.
- MID(), returns a specific number of characters from a text string starting at the position you specify.
Description
MID (Text,Start_Char,Num_Char) e.g. MID("String",1,3) displays Str as a result.
- MID counts 1 byte per characters. MID works with the languages that use 'Single Byte Character Set' (SBCS).
- If argument is directly entered in the command, it should be enclosed in double quotes (e.g. "Name").
- should be >= 1, else Calci displays #N/A error message.
- If > 'length of text', Calci displays empty text ("").
- If + > 'length of text', Calci displays the characters up to the end of text.
- If is negative, Calci displays #N/A error message.
Examples
WelCome | ||
Apple Orange | ||
*123*123 | ||
=MID(A1,1,3) : Displays 3 character string in cell A1 starting from 5th position.
Displays Wel as the output. =MID(A2,7,14) : Displays 14 characters in cell A2 starting from 7th position.
Displays Orange as the output. =MID(A3,1,1) : Displays character string in cell A3 starting from 1st position.
Displays * as the output. =MID("good" & "morning",1,8) : Joins the two strings and returns 8 characters starting from 1st position.
Displays goodmorn as the output.
Related Videos
See Also
References