Forum OpenACS Development: substring in TCL?

Collapse
Posted by Devon Yoo on
let's say
set temp "abcdefg"

how can I get a substring cde?

Collapse
2: Re: substring in TCL? (response to 1)
Posted by Torben Brosten on
Collapse
3: Re: substring in TCL? (response to 1)
Posted by Brian Fenton on
Hi Devon!

Great to see a new face on the forum. 😊

I would use string range to do that.

set result [string range $temp 2 4]

In OpenACS, you can use the developer shell to play around with stuff like that. It's under /ds/shell.tcl

Best of luck, and feel free to ask as many questions as you like. Beginners are VERY welcome.

Brian