NAnt SDK Documentation - v0.92 |

# StringFunctions.Trim Method

Returns the given string trimmed of whitespace.

[Visual Basic]
<Function(Name:="trim")>
Public Shared Function Trim( _
ByVal s As String _
) As String
[C#]
[Function(Name="trim")]
public static string Trim(
string s
);

#### Parameters

s
  input string

#### Return Value

The string s with any leading or trailing white space characters removed.

#### Example

    string::trim('  test  ') ==> 'test'

    string::trim('\t\tfoo  \r\n') ==> 'foo'

#### See Also

StringFunctions Class | NAnt.Core.Functions Namespace