BizTalk - String Functoids

   String Functoids:
    1. If you specify a non-number instead of number, functoid will generate nothing instead of throwing an exception.

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());

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

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

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

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

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());

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());

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

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#.

posted on 2008-04-01 12:49 zhanqiangz(闲云野鹤) 阅读(149) 评论(0)  编辑 收藏 所属分类: BizTalk


标题  
姓名  
主页
Email (只有博主才能看到) 
验证码 *  看不清,换一张 [登录][注册]
内容(请不要发表任何与政治相关的内容)  
  登录  使用高级评论  新用户注册  返回页首  恢复上次提交      
 
另存  打印
 


<2008年4月>
303112345
6789101112
13141516171819
20212223242526
27282930123
45678910

导航

统计

公告

如转载本博客的相关资料敬请注明出处.谢谢合作!

与我联系

常用链接

留言簿(6)

我参与的团队

我的标签

随笔分类(51)

随笔档案(49)

文章分类(7)

文章档案(5)

收藏夹(3)

.NET

BizTalk

Design

JavaScript

My Blogs

Power Tools

Process Control

Search Engine

SQL Server

XML

搜索

积分与排名

最新评论

阅读排行榜

评论排行榜