Re: Heredoc strings
- Posted by jeremy (admin) Feb 23, 2009
- 907 views
DerekParnell said...
mattlewis said...
I presume that the trimmed whitespace needs to be spaces. How would it deal with a tab thrown in?
Both the SPACE and TAB character are classed as a single whitespace character. Thus leading TABs are not expanded to equivalent SPACEs before trimming. It is not advisable to use TABS as leading whitespace in extended string literals.
I think we need to really think this one through. Although this ability is great, I am not sure it's the best way of going about it. Tabs and Spaces should both be alowed and the syntax is a bit cumbersome/weird, however I understand it's purpose.
Are their any other implementation ideas on this subject?
Jeremy