Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to concatenate strings in TCL without adding whitespace

Tags:

string

tcl

I want to concatenate two strings without any whitespaces between the strings that are being concatenated. But when I use the commands below, I get strings concatenated with whitespaces added between them. How to concatenate the strings without adding whitespaces?

set A "Test"
set B "data"

set C $A$B

Current Output :

Test       data

I need output similar to this :

Testdata
like image 344
user1270123 Avatar asked Dec 06 '25 18:12

user1270123


1 Answers

If I try that, it works like this:

$ tclsh
% set A "Test"
Test
% set B "data"
data
% set C $A$B
Testdata

Could it be you have accidentally entered some control character between A and $?

like image 162
sti Avatar answered Dec 08 '25 12:12

sti