Talk:Determine if a string is numeric: Difference between revisions
Content added Content deleted
(New section: Objective-C question) |
(→Subtle bug in the C example?: C example return true if void string is passed (?)) |
||
Line 6: | Line 6: | ||
[[User:JimD|JimD]] 16:16, 11 October 2007 (MDT) |
[[User:JimD|JimD]] 16:16, 11 October 2007 (MDT) |
||
:I think you are right: if you pass a void string, it returns ''true'' ... But it could be interpreted like: a void string can rapresent anything... :D I rather would add |
|||
<c>if ( s==NULL ) return 0; |
|||
if ( *s == 0 ) return 0;</c> |
|||
:This checks also for NULL pointer passed (odd!). --[[User:ShinTakezou|ShinTakezou]] 22:52, 11 December 2008 (UTC) |
|||
== Unix shell == |
== Unix shell == |