spacing between characters [message #84872] |
Fri, 14 June 2013 17:56  |
mkmvarma
Messages: 24 Registered: November 2007
|
Junior Member |
|
|
Hello,
I am trying to write out a text file in IDL. I have string that I want to write in the file but would like to increase the spacing between the characters in the string. Is there a way to do that in IDL?
The string that I have is : 0.01 0.15 0.25 0.48 1.08 1.93 2.76 4.74 9.50
I would like increase the spacing between each character (between 0.01 and 0.15 and so on).
Thanks
|
|
|
Re: spacing between characters [message #84874 is a reply to message #84872] |
Sat, 15 June 2013 02:26  |
Mats Löfdahl
Messages: 263 Registered: January 2012
|
Senior Member |
|
|
On 2013-06-15 02:56, mkmvarma@gmail.com wrote:
> The string that I have is : 0.01 0.15 0.25 0.48 1.08 1.93 2.76 4.74 9.50
> I would like increase the spacing between each character (between 0.01 and 0.15 and so on).
IDL> a='0.01 0.15 0.25 0.48 1.08 1.93 2.76 4.74 9.50'
IDL> print,a
0.01 0.15 0.25 0.48 1.08 1.93 2.76 4.74 9.50
IDL> print,strjoin(strsplit(a,' ',/extr),' ')
% Compiled module: STRSPLIT.
0.01 0.15 0.25 0.48 1.08 1.93 2.76 4.74 9.50
IDL> print,strjoin(strsplit(a,' ',/extr),' ')
0.01 0.15 0.25 0.48 1.08 1.93 2.76 4.74 9.50
|
|
|