Leading or trailing white space characters in file names


Re: Leading or trailing white space characters in file names
#21
Out of curiosity, I did a search in the parts library on my computer using the following regex:
Code:
^[ \t]+[0-5]
(The regex matches <beginning of line><one or more spaces or tabs><number between 0 and 5>.)

It resulted in 113,134 matching lines in 1217 files. For comparison's sake, removing the leading white space from the regex resulted in 1,093,769 matching lines in 6553 files, which means that over 10% of the lines in LDraw files have leading white space.

So I think we should formalize that white space is allowed before the line type.

On a somewhat related, but separate note, I think that we should disallow white space before the 0 on the first line of an LDraw file, because the "0 " at the beginning of the file can be used as something of a magic number for the LDraw file type.
Reply
« Next Oldest | Next Newest »



Messages In This Thread
Re: Leading or trailing white space characters in file names - by Travis Cobbs - 2011-12-20, 20:48

Forum Jump:


Users browsing this thread: 1 Guest(s)