AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   String of spaces [solved] (https://forums.alliedmods.net/showthread.php?t=2560)

AssKicR 06-08-2004 17:20

String of spaces [solved]
 
i'm kinda sleepy now so if someone could just write me a stock to do this

read a string and check if the chars are spaces
if all the chars is spaces return 1 if not return 0

SidLuke 06-08-2004 17:34

Code:
#include <string> stock is_empty_string(sz[]){   new i = 0   while ( sz[i] ){     if ( !isspace(sz[i]) ){       return 0     i++   }   return 1 }


All times are GMT -4. The time now is 14:38.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.