Versions Compared

Key

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

...

Name and ParametersDescriptionReturn TypeUsage Example
Append(string value)Returns a new string with the specified string added to the endstringString$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 defaultbooleanBoolean

Insert(int startIndex, string value)Returns a new string in which a specified string is inserted at a specified index position in the current textstringString


LengthReturns the number of characters in the textintegerInteger


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 lengthstringString

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 lengthstringString

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 deletedstringString

Replace(string oldValue, string newValue)Replaces all occurrences of the first specified string in the current string with the second specified stringstringString$Configuration.Name.Replace("v.", "version" )$"Test Config version 10" (given "Test Config v. 10")
Replace(string pattern, string replacement, ignoreCase)Returns a new string in which all matches of the specified regular expression pattern in the current text are replaced with a specified replacement string


Split(string separators, [bool trimWhitespace,] [bool removeEmptyEntries])Splits a string into substrings separated by any of the characters in separator parameterstring arrayString Collection

SplitWithQuotes(string separators [, string quotetype] [, bool trimQuotes] [, bool trimWhitespace] [, bool removeEmptyEntries])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 arrayString Collection


Substring(int startIndex [, int length])Returns a substring of the current text starting at a specified character position with an optional specified lengthstringString


ToBoolean()Parses text to a boolean, allowing boolean operations and functionsbooleanBoolean


ToLower()Converts a string to lowercasestringString$Source.RepoName.Branch.ToLower$"version 1.5" (given "Version 1.5")
ToNumber()Parses text to a number, allowing numeric operations and functionsnumberNumber

ToUpper()Converts a string to uppercasestringString$Project.Name.ToUpper$"PROJECT X" (given "Project X")
TrimStart([string trimChars])Returns a new string with all leading occurrences of white space or a specified set of characters removedstringString

Trim([string trimChars])Returns a new string with all leading and trailing occurrences of white space or a specified set of characters removed
string
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 trimChars])Returns a new string with all trailing occurrences of white space or a specified set of characters removedstringString