FINDB
Finds the specified substring within another string and is intended for languages that use the double-byte character set (DBCS) like Japanese, Chinese, Korean etc.
Syntax
expression.FINDB(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. Use double quotes (empty text) to match the first character in the search string. Wildcard characters are not allowed. | |
| arg2 | Required | ApiRange | ApiName | string | The text containing the text to find. | |
| arg3 | Optional | ApiRange | ApiName | number | Specifies the character at which to start the search. The first character in the search string is character number 1. If omitted, this parameter is equal to 1. |
Returns
number
Example
This example shows how to find the specified substring within another string and is intended for languages that use the double-byte character set (DBCS) like Japanese, Chinese, Korean etc.
- Code
- Result
// How to get an index of a substring from a string and its double-byte character language.
// Use function to find out a starting position of a substring containing in another text and its character set (DBCS).
let worksheet = Api.GetActiveSheet();
let func = Api.WorksheetFunction;
worksheet.GetRange("A1").SetValue(func.FINDB("line", "Online Office"));