Versions Compared

Key

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

...

Anchor
stringfunctions
stringfunctions
String Functions

NameDescriptionParametersReturn TypeUsage
Examples
Example
AppendReturns a new string with the specified string added to the end
StringFormatFormats a date or time value using standard or custom .Net formatting stringsString$Server.Now.Format("hh:mm")$"23:55" (given the date time "31/12/2000 23:55:333")ToLowerConverts a string to lowercaseString$Source.RepoName.Branch.ToLower$"version 1.5" (given "Version 1.5")ToUpperConverts a string to uppercaseString$Project.Name.ToUpper$"PROJECT X" (given "Project X")TrimRemoves all leading and trailing occurrences of whitespace or the characters in the string providedString

$Build.Version.Trim$

$Build.Version.Trim(".,")$

"a b c d" (given " a b c d  ")

"a.b.c.d" (given ",a.b.c.d.")

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

DateTime Functions

string valuestring$Configuration.Name.Append(" ").Append($Build.Version$)$"Build Config 1.2.3" (given "Build Config", and "1.2.3")
InsertReturns 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 text
integer

PadLeftReturns 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

PadRightReturns 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

RemoveReturns a new string in which a specified number of characters in the current text beginning at a specified position have been deleted
String

ReplaceReplaces 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
NameDescriptionTypeUsage ExamplesFormatFormats a date or time value using standard or custom .Net formatting stringsString$Server.Now.Format("hh:mm")$"23:55" (given the date time "31/12/2000 23:55:333
")
ToLowerConverts a string to lowercase
String$Source.RepoName.Branch.ToLower$"version 1.5" (given "Version 1.5")
ToUpperConverts a string to uppercase
String$Project.Name.ToUpper$"PROJECT X" (given "Project X")
TrimStart

String

TrimRemoves 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

Contains




ToNumber




ToBoolean




Substring




Split




SplitWithQuotes






















DateTime Functions

NameDescriptionTypeUsage Examples
FormatFormats a date or time value using standard or custom .Net formatting stringsString$Server.Now.Format("hh:mm")$"23:55" (given the date time "31/12/2000 23:55:333ReplaceReplaces 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")