StringFunctions Class

Summary

Class which provides NAnt functions to work with strings.
Assembly
NAnt.Core.dll
Namespace
NAnt.Core.Functions
Base Types
graph BT Type-->Base0["FunctionSetBase"] click Base0 "/api/NAnt.Core/FunctionSetBase" Base0-->Base1["Object"] Type["StringFunctions"] class Type type-node

Syntax

[FunctionSet("string", "String")]
public class StringFunctions : FunctionSetBase

Attributes

Type Description
FunctionSetAttribute Indicates that class should be treated as a set of functions.

Constructors

Name Summary
StringFunctions(Project, PropertyDictionary) Initializes a new instance of the NAnt.Core.Functions.StringFunctions class.

Properties

Name Value Summary
Project Project
Gets or sets the NAnt.Core.FunctionSetBase.Project that this functionset will reference.
Inherited from FunctionSetBase

Methods

Name Value Summary
Contains(string, string) bool
Tests whether the specified string contains the given search string.
static
EndsWith(string, string) bool
Tests whether the specified string ends with the specified suffix string.
static
GetLength(string) int
Returns the length of the specified string.
static
IndexOf(string, string) int
Returns the position of the first occurrence in the specified string of the given search string.
static
LastIndexOf(string, string) int
Returns the position of the last occurrence in the specified string of the given search string.
static
PadLeft(string, int, string) string
Returns the given string left-padded to the given length.
static
PadRight(string, int, string) string
Returns the given string right-padded to the given length.
static
Replace(string, string, string) string
Returns a string corresponding to the replacement of a given string with another in the specified string.
static
StartsWith(string, string) bool
Tests whether the specified string starts with the specified prefix string.
static
Substring(string, int, int) string
Returns a substring of the specified string.
static
ToLower(string) string
Returns the specified string converted to lowercase.
static
ToUpper(string) string
Returns the specified string converted to uppercase.
static
Trim(string) string
Returns the given string trimmed of whitespace.
static
TrimEnd(string) string
Returns the given string trimmed of trailing whitespace.
static
TrimStart(string) string
Returns the given string trimmed of leading whitespace.
static