首页 > 其他 > 详细

lreplace

时间:2014-10-04 12:09:16      阅读:235      评论:0      收藏:0      [点我收藏+]

Replacing an element of a list with another:

% lreplace {a b c d e} 1 1 foo
a foo c d e

Replacing two elements of a list with three:

% lreplace {a b c d e} 1 2 three more elements
a three more elements d e

Deleting the last element from a list in a variable:

% set var {a b c d e}
a b c d e
% set var [lreplace $var end end]
a b c d

lreplace

原文:http://www.cnblogs.com/greencolor/p/4005722.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!