Summary
Returns the length of the specified string.
- Assembly
- NAnt
.Core .dll - Namespace
- NAnt
.Core .Functions - Containing Type
- StringFunctions
Syntax
[Function("get-length")]
public static int GetLength(string s)
Examples
string::get-length('foo') ==> 3
string::get-length('') ==> 0
Attributes
Type | Description |
---|---|
FunctionAttribute | Indicates that the method should be exposed as a function in NAnt build files. |
Parameters
Name | Type | Description |
---|---|---|
s | string | input string |
Return Value
Type | Description |
---|---|
int | The string's length. |