[]
        
(Showing Draft Content)

SEARCHB

This function searches one text value within another and returns the text value’s position in the text you searched.

Syntax

SEARCHB(findtext, intext, start)

Arguments

This function has the following arguments:

Argument

Description

findtext

Refers to the text you are trying to find; if empty (" "), the function matches the first character in the search string (that is, the character numbered start or 1); cannot contain wildcard characters.

intext

Refers to the text through which you are searching.

start

[Optional] Refers to the number representing character at which to start the search. The first character ofintextargument is 1. If this value is omitted, the calculation starts at 1. If this value is not an integer, the number is truncated.

Remarks

The SEARCHB function counts 2 bytes per character, but it happens only when a DBCS language is set as the default language.


This function performs a case-specific search (for example, to specify a capital letter and not lower case letters).

Data Types

Accepts string data for the findtext argument, string data for the intext argument, and numeric data for the start argument. Returns numeric data.

Examples

SEARCHB("MOB", "MOBILE") gives the result 1.