SEARCHB
Returns the location of the specified substring in a string and is intended for languages that use the double-byte character set (DBCS) like Japanese, Chinese, Korean etc.
Syntax
expression.SEARCHB(arg1, arg2, arg3);
expression
- A variable that represents a ApiWorksheetFunction class.
Parameters
Name | Required/Optional | Data type | Default | Description |
---|---|---|---|---|
arg1 | Required | ApiRange | ApiName | string | The text to find. The ? and * wildcard characters can be used. Use ~? and ~* to find the ? and * characters. | |
arg2 | Required | ApiRange | ApiName | string | The text where to search for the specified text. | |
arg3 | Optional | ApiRange | ApiName | number | The character number in the search text, counting from the left, at which to start searching. If omitted, 1 is used. |
Returns
number
Example
- Code
- Result
let worksheet = Api.GetActiveSheet();
let func = Api.GetWorksheetFunction();
worksheet.GetRange("A1").SetValue(func.SEARCHB("line", "Online Office"));