string::index-of

[This is preliminary documentation and subject to change.]

Returns the position of the first occurrence in the specified string of the given search string.

Usage

string::index-of(str, substr)

Parameters

Name Type Description
str string input string
substr string search string

Return Value

The lowest-index position of substr in str if it is found, or -1 if str does not contain substr.

If substr is an empty string, the return value will always be 0.

Remarks

This function performs a word (case-sensitive and culture-sensitive) search using the current culture.

Examples

Requirements

Assembly: NAnt.Core (0.85.1698.0)