|
|
Problem with whitespace
Hi All,
I have to form a string inside a iteration and after the iteration ends I have to replace a particular string in a file with the one just formed. Now the problem is when I am concatenating the string it is not allowing me to concat a white space at the end which needs to be added after each iteration. I think I have clearly stated the problem...can anybody please help me with this?
Regards
Samiran
|
|
0
|
|
|
|
Reply
|
samiran.dam (70)
|
3/6/2010 9:17:40 AM |
|
Previously I posted one post related to this, that time I got lucky to use sprintf and got rid of the problem...but now I am not sure how I can use sprintf.
|
|
0
|
|
|
|
Reply
|
Samiran
|
3/6/2010 9:19:43 AM
|
|
Dear Samiran!
> I have to form a string inside a iteration and after the iteration ends I have to replace a particular string in a file with the one just formed. Now the problem is when I am concatenating the string it is not allowing me to concat a white space at the end which needs to be added after each iteration. I think I have clearly stated the problem...
No, you haven't. You did not tell us, how you perform the concatenation.
E.g. this fails:
strcat('trailing space ', {'FULL'});
This conserve the space:
strcat({'trailing space '}, {'FULL'});
This also:
cat(2, 'trailing space ', 'FULL');
Please post the important detail.
Kind regards, Jan
|
|
0
|
|
|
|
Reply
|
Jan
|
3/6/2010 2:31:05 PM
|
|
Samiran <samiran.dam@gmail.com> wrote in message <1174857504.328743.1267885213981.JavaMail.root@gallium.mathforum.org>...
> Previously I posted one post related to this, that time I got lucky to use sprintf and got rid of the problem...but now I am not sure how I can use sprintf.
as you were told -many a times- by now
read the documentation(!)...
help sprintf;
doc sprintf;
there is no need for you to get -lucky-(!)...
you must educate yourself(!)...
us
|
|
0
|
|
|
|
Reply
|
us
|
3/6/2010 3:48:06 PM
|
|
|
3 Replies
234 Views
(page loaded in 0.077 seconds)
Similiar Articles: Grep string with spaces - comp.unix.shellI'm having a problem with a grep now. I'm using this code: if [ "`cat /etc/rc2.d/S70ipalias | grep $ALIASIP`" = "" ] The problem is that with this, ... Best way to delete old files? find & exec VS find & xargs - comp ...For a while I've been doing this: find /scratch -mtime +14 | xargs rm But I feel somehow limited by this, since this has problems with filenames with spaces in, and also ... exec with start and file names with spaces - comp.lang.tcl ...The only solution I have found to this problem is to pass the short name of the program, which is guaranted to not contain spaces: set program [file nativename [file ... Input Mask Problem ! - comp.databases.ms-accessI want to restrict a user to enter ONLY numbers 0-9 in a text box with a max length of 10 digits. No signs, spaces allowed. All 10 digits are not co... GNU Make: replace spaces with commas - comp.unix.programmer ...... comma and space in GNU Make | John Graham-Cumming Sometimes you need to hide a comma or a space from GNU Make's parser because GNU ... A similar problem occurs with spaces. How to separate command line args - comp.lang.rexxHi, I have a very basic problem. I want to pass multiple arguments to a REXX script via a commandline. There is a chance that some arguments contain spaces, so I ... Can't Debug in Ruby - comp.lang.ruby> Not to mention that incredibly annoying bug that doesn't allow any > spaces in the installation path. > Path with spaces is always a problem for all the tools. CSV files with some double-quoted fields with commas inside - comp ...Also, there may be whitespace between fields separators. I've seen some posts ... The main problem with parsing CSV files is that there's various different file ... Do solaris users never do a recursive grep? - comp.unix.solaris ...Grep string with spaces - comp.unix.shell... this, since this has problems with filenames with spaces ... the file/directory name as a null terminated string. ... Parsing file names with spaces - comp.lang.perl.miscCan you exlpain what you want to do, and why spaces are a > problem? I want to take these three array elements and extract the file names which include spaces ... python string input problem with whitespace! - Stack OverflowTesting with Python 2.5.2, your code ran OK as long as I only had the same spacing on either side of the + and = in the code and input. You appear to have two spaces ... MySQL Bugs: #3914: Problem with whitespace at end of column nameBug #3914: Problem with whitespace at end of column name: Submitted: 27 May 2004 16:02: Modified: 9 Jun 2004 11:38: Reporter: [ name withheld ] Email Updates: 7/15/2012 5:30:17 PM
|
|
|
|
|
|
|
|
|