主题:  控制字符串的6个小技巧

5DDC版主

职务:版主
等级:6
金币:10.0
发贴:3820
#12002/4/30 9:22:13
合并两个字符串 如:("String1" + "String2" = "String1String2")


#x#


如何去除字符串的首个字母或末个字母?






String minus last character = #y#

String minus first character = #z#


如何保留字符串中间部分





#y#


如何从列表中得到第N个子列。





#y#


如何替换列表中子列部分。






Original String - "Bill Guttman, Dave Guttman, Bob Guttman"

Replaces all cases of "Guttman" with "Smith" - #y#

Replaces first case of "Guttman" with "Smith" - #Z#



如何从列表中去除重复的值

























Old List: #OrigList#

New List: #NewList#

编辑历史:[这消息被batyvn编辑过(编辑时间2002-04-30 09:22:56)]