shouting versus dotting
Sean Kelly
sean at invisibleduck.org
Sun Oct 5 11:42:19 PDT 2008
Andrei Alexandrescu wrote:
> Sean Kelly wrote:
>> Andrei Alexandrescu wrote:
>>> Sean Kelly wrote:
>>>>
>>>> Will do. It's easy enough to search-replace '!' with '.'
>>>
>>> You'll need a sed expression to not catch unary ! and != as well.
>>
>> Nah, just replace "!(" with ".(" I basically never use "!(exp)" in
>> conditions so there should be no problems.
>
> Well well laziness never helps.
>
> sed --in-place -e 's/\([a-zA-Z0-9_]\)\(\s*\)!\(\s*\)(/\1\2.\3(/' *.d
>
> Preserves whitespace used around !, too. The major problem is it will
> transform insides of strings too. Also, won't transform instantiations
> across lines, and won't work with Unicode symbols...
I'm just talking about my own code here, not a universal conversion tool.
Sean
More information about the Digitalmars-d
mailing list