QuicksearchArchivesCalendar
|
Wednesday, September 23. 2009Don't use strptime, use a regexTrackbacks
Trackback specific URI for this entry
No Trackbacks
Comments
Display comments as
(Linear | Threaded)
Wouldn't it be easier and probably faster to just use split?
Something like that:
Yeah, it might have been just as easy. I suppose the regex provides some sanity checking. The reason I went with the regex was because I was already using a regex to check if it is a date column (long story, bad "csv" formate file, etc). So, it was a natural mental jump: something I was already using sparked my next step. If I hadn't been using a regex, split probably would have come to mind. I'll have to benchmark both approaches and see what I can find out.
Thanks for the suggestion! |
self.about()My name is Joshua Kugler, and I'm a programmer/developer and a system admin. On this here blog, I pontificate about all things related to code, work, projects, and sometimes just life. Look around, snag my RSS feed, and drop me a line, if you wish. All opinions are mine, and not necessarily those of my employer.
self.links()CategoriesCopyright |
|||||||||||||||||||||||||||||||||||||||||||||||||