c - What techniques are available to test if a character string is all spaces? -


  चार * p = "woohoo"; Int condition = / * कुछ 0x20 / रिक्त स्थान / रिक्त स्थान के लिए केवल * / if (condition) {} else {printf ("not") को देखने के लिए p * / / * पर लागू कुछ गणना; } Printf ("सभी रिक्त स्थान \ n");  

एक-लाइनर:

  int condition = Strspn (पी, "") == strlen (पी);  

थोड़ा अधिक अनुकूलित:

  int condition = p [strspn (p, "")] == '\ 0';  

Comments

Popular posts from this blog

paypal - How to know the URL referrer in PHP? -

oauth - Facebook OAuth2 Logout does not remove fb_ cookie -

wpf - Line breaks and indenting for the XAML of a saved FlowDocument? -