跳到主要内容

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

NameRequired/OptionalData typeDefaultDescription
arg1RequiredApiRange | ApiName | stringThe text to find. The ? and * wildcard characters can be used. Use ~? and ~* to find the ? and * characters.
arg2RequiredApiRange | ApiName | stringThe text where to search for the specified text.
arg3OptionalApiRange | ApiName | numberThe character number in the search text, counting from the left, at which to start searching. If omitted, 1 is used.

Returns

number

Example

let worksheet = Api.GetActiveSheet();
let func = Api.GetWorksheetFunction();
worksheet.GetRange("A1").SetValue(func.SEARCHB("line", "Online Office"));