Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Anchor
stringfunctions
stringfunctions
String Properties and Functions

Name and ParametersDescription
Parameters
Return TypeUsage Example
Append(string value)Returns a new string with the specified string added to the endstring
value
string
$Configuration.Name.Append(" ").Append($Build.Version$)$"Build Config 1.2.3" (given "Build Config", and "1.2.3")
Contains(string value, bool ignoreCase)Returns a value indicating whether the specified string occurs within the current text. Use ignoreCase parameter is false by defaultboolean

Insert(int startIndex, string value)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

LengthReturns the number of characters in the textinteger

PadLeft(int totalWidth, char paddingChar)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 lengthstring


PadRight(int totalWidth, char paddingChar)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 lengthstring


Remove(int startIndex, int count)Returns a new string in which a specified number of characters in the current text beginning at a specified position have been deletedstring


ReplaceReplaces all occurrences of the first specified string in the current string with the second specified stringstring
$Configuration.Name.Replace("v.", "version" )$"Test Config version 10" (given "Test Config v. 10")
SplitSplits a string into substrings separated by any of the characters in separator parameterstring array

SplitWithQuotesSplits 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

SubstringReturns a substring of the current text starting at a specified character position with an optional specified lengthstring

ToBooleanParses text to a boolean, allowing boolean operations and functionsboolean

ToLowerConverts a string to lowercasestring
$Source.RepoName.Branch.ToLower$"version 1.5" (given "Version 1.5")
ToNumberParses text to a number, allowing numeric operations and functionsnumber

ToUpperConverts a string to uppercasestring
$Project.Name.ToUpper$"PROJECT X" (given "Project X")
TrimStartReturns a new string with all leading occurrences of white space or a specified set of characters removedstring


TrimReturns 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 removedstring


Number Functions

NameDescriptionParametersReturn TypeUsage Examples
AddAdds the specified number to the current number and returns the result
number

CeilingReturns the smallest integer greater than or equal to the current decimal number
number

DecrementDecrements the current number by one
number

DivideDivides the current number by the specified number and returns the result
number

FloorReturns the largest integer less than or equal to the current decimal number
integer

IncrementIncrements the current number by one
number

IntegerDivideDivides the current integer by the specified integer and returns an integer result
integer

ModulusReturns the remainder after dividing the current number by the specified number
number

MultiplyMultiplies the current number by the specified number and returns the result
number

RoundRounds the current decimal number to the nearest integer
integer

SubtractSubtracts the specified number from the current number and returns the result
number

ToStringParses current number to a string, allowing string operations and functions
string



















...

DateTime Properties and Functions

NameDescriptionParametersReturn TypeUsage Examples
Day

string array

DayOfWeek














































FormatFormats 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")

...





























































Date Properties and Functions

NameDescriptionParametersReturn TypeUsage Examples
FormatFormats 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")

...







Date Time Properties and Functions

NameDescriptionParametersReturn TypeUsage Examples
FormatFormats 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")