# string::starts-with

[This is preliminary documentation and subject to change.]

Tests whether the specified string starts with the specified prefix string.

### Usage

`bool string::starts-with(s1, s2)`

### Parameters

Name | Type | Description
--- | --- | ---
s1 | string | test string
s2 | string | prefix string

### Return Value

true when s2 is a prefix for the string s1. Meaning, the characters at the beginning of s1 are identical to s2; otherwise, false.

### Remarks

This function performs a case-sensitive word search using the invariant culture.

### Examples

-     string::starts-with('testing string', 'test') ==> true

-     string::starts-with('testing string', 'testing') ==> true

-     string::starts-with('testing string', 'string') ==> false

-     string::starts-with('test', 'testing string') ==> false

### Requirements

Assembly: NAnt.Core (0.91.3881.0)