Summary
Returns the given string trimmed of whitespace.
- Assembly
- NAnt
.Core .dll - Namespace
- NAnt
.Core .Functions - Containing Type
- StringFunctions
Syntax
[Function("trim")]
public static string Trim(string s)
Examples
string::trim(' test ') ==> 'test'
string::trim('\t\tfoo \r\n') ==> 'foo'
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 |
|---|---|
| string | The string s with any leading or trailing white space characters removed. |
