文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>《TCL 教程英文版》 笔记 §19 字符串子命令 - l..

《TCL 教程英文版》 笔记 §19 字符串子命令 - l..

时间:2008-08-26  来源:oychw

§19   字符串子命令 - length index range

实例:

# cat ch19

# !/bin/bash

# \

exec tclsh "$0" "$@"

 

set string "this is my test string"

 

puts "There are [string length $string] characters in \"$string\""

 

puts "[string index $string 1] is the second character in \"$string\""

 

puts "\"[string range $string 5 10]\" are characters between the 5'th and 10'th"

 

运行结果:

# ./ch19

There are 22 characters in "this is my test string"

h is the second character in "this is my test string"

"is my " are characters between the 5'th and 10'th

相关阅读 更多 +
排行榜 更多 +
辰域智控app

辰域智控app

系统工具 下载
网医联盟app

网医联盟app

运动健身 下载
汇丰汇选App

汇丰汇选App

金融理财 下载