Difference between revisions of "Manuals/calci/SEARCH"
Jump to navigation
Jump to search
Line 1: | Line 1: | ||
<div style="font-size:30px">'''SEARCH (Find_Text,Within_Text,Start_Num) '''</div><br/> | <div style="font-size:30px">'''SEARCH (Find_Text,Within_Text,Start_Num) '''</div><br/> | ||
where | where | ||
− | *<math> | + | *<math>Find-Text</math> is the text to search in original string, |
− | *<math> | + | *<math>Within-Text</math> is the original string from which mentioned text is to be searched, and |
*<math>Start-Num</math> is an optional argument that specifies the character position to start the search. | *<math>Start-Num</math> is an optional argument that specifies the character position to start the search. | ||
**SEARCH() identifies the occurrence of specified text string from the original string and returns the starting position of the matched string. | **SEARCH() identifies the occurrence of specified text string from the original string and returns the starting position of the matched string. | ||
Line 15: | Line 15: | ||
*SEARCH function can be used to find text within a text. SEARCH counts 1 byte per character. SEARCH works with the languages that use 'Single Byte Character Set' (SBCS). | *SEARCH function can be used to find text within a text. SEARCH counts 1 byte per character. SEARCH works with the languages that use 'Single Byte Character Set' (SBCS). | ||
*<math>Within-Text</math> can be any string containing characters, numbers, symbols, blank spaces etc. | *<math>Within-Text</math> can be any string containing characters, numbers, symbols, blank spaces etc. | ||
− | *<math>Find-Text</math> and <math> | + | *<math>Find-Text</math> and <math>Within-Text</math> when directly entered in the command, should be enclosed in double quotes (e.g. "Name"). |
*Argument <math>Start-Num</math> is optional. If omitted, Calci assumes to be 1. | *Argument <math>Start-Num</math> is optional. If omitted, Calci assumes to be 1. | ||
*<math>Start-Num</math> should be an integer > 0, else Calci displays #NULL error message. | *<math>Start-Num</math> should be an integer > 0, else Calci displays #NULL error message. |
Latest revision as of 16:49, 13 August 2018
SEARCH (Find_Text,Within_Text,Start_Num)
where
- is the text to search in original string,
- is the original string from which mentioned text is to be searched, and
- is an optional argument that specifies the character position to start the search.
- SEARCH() identifies the occurrence of specified text string from the original string and returns the starting position of the matched string.
Description
SEARCH (Find_Text,Within_Text,Start_Num) For Example,
SEARCH("COME", "WELCOME",1) returns 4
- SEARCH function can be used to find text within a text. SEARCH counts 1 byte per character. SEARCH works with the languages that use 'Single Byte Character Set' (SBCS).
- can be any string containing characters, numbers, symbols, blank spaces etc.
- and when directly entered in the command, should be enclosed in double quotes (e.g. "Name").
- Argument is optional. If omitted, Calci assumes to be 1.
- should be an integer > 0, else Calci displays #NULL error message.
- If > 'length of text', Calci displays #N/A error message.
- If string specified in is not a part of the reference string , Calci returns #N/A error string.
- SEARCH function is not case sensitive.
Examples
SEARCH | ||
Happy New Year!!! | ||
=SEARCH("A", A1) : Returns 3 as output. =SEARCH("New", A2) : Returns 7 as output. Space character is also counted. =SEARCH("Year",A2,6) : Search is started from 6th position. Returns 11 as output.
Space character is also counted.
Related Videos
See Also
References