...
Name | Description | Type | Usage Example | |
---|---|---|---|---|
Major | The version major portion of the version number | Integer | $Build.Version.DotNet.Major$ | "1" (given "1.2.0.1287") |
Minor | The version minor portion of the version number | Integer | $Build.Version.DotNet.Minor$ | "2" (given "1.2.0.1287") |
Build | The version build portion of the version number | Integer | $Build.Version.DotNet.Build$ | "0" (given "1.2.0.1287") |
Revision | The version revision portion of the version number | Integer | $Build.Version.DotNet.Revision$ | "1287" (given "1.2.0.1287") |
Anchor | ||||
---|---|---|---|---|
|
Name | Description | Parameters | Return Type | Usage Example | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Append | Returns a new string with the specified string added to the end | string value | string | $Configuration.Name.Append(" ").Append($Build.Version$)$ | "Build Config 1.2.3" (given "Build Config", and "1.2.3") | ||||||||||||||||||||||||
Contains | Returns a value indicating whether the specified string occurs within the current text. Use ignoreCase parameter is false by default | boolean | |||||||||||||||||||||||||||
Insert | Returns a new string in which a specified string is inserted at a specified index position in the current text | integer startIndex, string value | string | ||||||||||||||||||||||||||
Length | Returns the number of characters in the text | integer | |||||||||||||||||||||||||||
PadLeft | Returns a new string that right-aligns the characters in the current text by padding them on the left with a specified character, for a specified total length | string | |||||||||||||||||||||||||||
PadRight | Returns a new string that left-aligns the characters in the current text by padding them on the right with a specified character, for a specified total length | string | |||||||||||||||||||||||||||
Remove | Returns a new string in which a specified number of characters in the current text beginning at a specified position have been deleted | string | |||||||||||||||||||||||||||
Replace | Replaces all occurrences of the first specified string in the current string with the second specified string | string | $Configuration.Name.Replace("v.", "version" )$ | "Test Config version 10" (given "Test Config v. 10") | |||||||||||||||||||||||||
Split | string array | SplitWithQuotesSplits a string into substrings separated by any of the characters in separator parameter | string array | Substring | string | ToBoolean | boolean | ToLower | Converts a string to lowercase | string | $Source.RepoName.Branch.ToLower$ | "version 1.5" (given "Version 1.5") | ToNumber | number | ToUpper | Converts a string to uppercase | string | $Project.Name.ToUpper$ | "PROJECT X" (given "Project X") | TrimStart | string | Trim | Removes all leading and trailing occurrences of whitespace or the characters in the string provided | string | $Build.Version.Trim$ $Build.Version.Trim(".,")$ | "a b c d" (given " a b c d ") "a.b.c.d" (given ",a.b.c.d.") | TrimEnd | string |
Number Functions
SplitWithQuotes | Splits a string into substrings separated by any of the characters in separator parameter. Separators within quotes are ignored. The quoteType parameter can be "single" or "double" and defaults to "double" | string array | |||
Substring | Returns a substring of the current text starting at a specified character position with an optional specified length | string | |||
ToBoolean | Parses text to a boolean, allowing boolean operations and functions | boolean | |||
ToLower | Converts a string to lowercase | string | $Source.RepoName.Branch.ToLower$ | "version 1.5" (given "Version 1.5") | |
ToNumber | Parses text to a number, allowing numeric operations and functions | number | |||
ToUpper | Converts a string to uppercase | string | $Project.Name.ToUpper$ | "PROJECT X" (given "Project X") | |
TrimStart | Returns a new string with all leading occurrences of white space or a specified set of characters removed | string | |||
Trim | Returns a new string with all leading and trailing occurrences of white space or a specified set of characters removed | string | $Build.Version.Trim$ $Build.Version.Trim(".,")$ | "a b c d" (given " a b c d ") "a.b.c.d" (given ",a.b.c.d.") | |
TrimEnd | "Returns a new string with all trailing occurrences of white space or a specified set of characters removed | string |
Number Functions
Name | Description | Parameters | Return Type | Usage Examples | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Add | Adds the specified number to the current number and returns the result | number | ||||||||||||
Ceiling | Returns the smallest integer greater than or equal to the current decimal number | number | ||||||||||||
Decrement | Decrements the current number by one | number | ||||||||||||
Divide | ||||||||||||||
Name | Description | Parameters | Return Type | Usage Examples | ||||||||||
Add | Adds the specified number to the current number and returns the result | number | Ceiling | Returns the smallest integer greater than or equal to the current decimal number | number | Decrement | Decrements the current number by one | number | Divide | Divides the current number by the specified number and returns the result | number | |||
Floor | Returns the largest integer less than or equal to the current decimal number | integer | ||||||||||||
Increment | Increments the current number by one | number | ||||||||||||
IntegerDivide | Divides the current integer by the specified integer and returns an integer result | integer | ||||||||||||
Modulus | Returns the remainder after dividing the current number by the specified number | number | ||||||||||||
Multiply | Multiplies the current number by the specified number and returns the result | number | ||||||||||||
Round | Rounds the current decimal number to the nearest integer | integer | ||||||||||||
Subtract | Subtracts the specified number from the current number and returns the result | number | ||||||||||||
ToString | Parses current number to a string, allowing string operations and functions | string | ||||||||||||
Boolean Functions
Name | Description | Parameters | Return Type | Usage Examples | |
---|---|---|---|---|---|
And | Returns logical AND of current boolean value with specified value | boolean | |||
Or | Returns logical OR of current boolean value with specified value | boolean | |||
Not | Negates current boolean value | boolean | |||
ToString | Parses current boolean to a string, allowing string operations and functions | string | |||
DateTime Properties and Functions
Name | Description | Parameters | Return Type | Usage Examples | |
---|---|---|---|---|---|
Format | Formats a date or time value using standard or custom .Net formatting strings | String | $Server.Now.Format("hh:mm")$ | "23:55" (given the date time "31/12/2000 23:55:333") | |
DateTime Functions
Name | Description | Parameters | Return Type | Usage Examples | |
---|---|---|---|---|---|
Format | Formats a date or time value using standard or custom .Net formatting strings | String | $Server.Now.Format("hh:mm")$ | "23:55" (given the date time "31/12/2000 23:55:333") | |
DateTime Functions
Name | Description | Parameters | Return Type | Usage Examples | |
---|---|---|---|---|---|
Format | Formats a date or time value using standard or custom .Net formatting strings | String | $Server.Now.Format("hh:mm")$ | "23:55" (given the date time "31/12/2000 23:55:333") | |
...