l String Left Trim: Removes leading spaces from a text item.
Input Data: Zack Zhao
Output Data: Zack Zhao
Equivalent .Net function:
String sourceString = " ZackZhao";
Console.WriteLine(sourceString.TrimStart());
l String Concatenate: Concatenates a series of input strings.
Input Data: two strings: “Hello!” and “ Zack Zhao”.
Output Data: Hello! Zack Zhao
Equivalent .Net function:
string greeting = "Hello!";
string sourceString = " Zack Zhao";
Console.WriteLine(string.Concat(greeting, sourceString))
l Size: Returns, as an integer, the length of a string. Not bytes count.
Input Data: 我是中国人
Output Data: 5
Equivalent .Net function:
string sourceString = "我是中国人";
Console.WriteLine(sourceString.Length);
l String Left: Returns a specified number of characters from a text item, starting with the leftmost character.
Input Data: “我是中国人” and 2
Output Data: 我是
Equivalent .Net function:
string sourceString = "我是中国人";
Console.WriteLine(sourceString.Substring(0,2));
l String Extract: Extracts a string specified by the start and end positions of a super string.
leftmost character.
Input Data: “Zack” , 2 and 2
Output Data: a
Equivalent .Net function
string sourceString = "Zack";
Console.WriteLine(sourceString.Substring(1,1));
l Upper Case: Use the Uppercase functoid to convert a text item to uppercase characters. This functoid requires one input parameter.
Input Data: Zack Zhao
Output Data:ZACK ZHAO
Equivalent .Net function:
string sourceString = "Zack Zhao";
Console.WriteLine(sourceString.ToUpper());
l Lower Case: Use the Lowercase functoid to convert a text item to lowercase characters. This functoid requires one input parameter.
Input Data: Zack Zhao
Output Data: zack zhao
Equivalent .Net function:
string sourceString = "Zack Zhao";
Console.WriteLine(sourceString.ToLower());
l String Right: Use the String Right functoid to return a specified number of characters from a text item, starting with the rightmost character. This functoid requires two input parameters.
Input Data: “我是中国人” and 3
Output Data:中国人
Equivalent .Net function:
string sourceString = "我是中国人";
Console.WriteLine(sourceString.Substring(sourceString.Length-3,3));
l String Find: Use the String Find functoid to return the position in a string at which another specified string begins. This functoid requires two input parameters: the string that is being searched through, and the string which is being sought.
Input Data: “Zack” and “Z”
Output Data:1
Equivalent .Net function:
string sourceString = "Zack";
Console.WriteLine(sourceString.IndexOf("Z"));
Note: the position of the first character in a string is 1 not 0, it is different from c#.